Sfoglia il codice sorgente

修复GoodsSpecSelector测试失败问题

- 修复"点击确认按钮时调用onConfirm回调"测试
- 添加第三个参数undefined到toHaveBeenCalledWith期望值
- 组件调用onConfirm时传递三个参数:selectedSpec, quantity, actionType
- 当actionType未提供时,第三个参数为undefined
- 测试期望现在正确匹配实际调用参数

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 1 mese fa
parent
commit
67747ded5f

+ 2 - 1
mini/tests/unit/components/goods-spec-selector/goods-spec-selector.test.tsx

@@ -263,7 +263,8 @@ describe('GoodsSpecSelector组件', () => {
         price: 299,
         stock: 50
       }),
-      1
+      1,
+      undefined
     )
     expect(mockOnClose).toHaveBeenCalled()
   })