Skip to content

Commit

Permalink
test: [select] 修复单测报错
Browse files Browse the repository at this point in the history
  • Loading branch information
haohao_peng committed Nov 29, 2024
1 parent 818ad8d commit f6d14bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/select/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,11 @@ describe('Select', () => {
expect(selectValue.toString()).toBe('apple')
expect(defaultOpenMultiple.find('.kd-tag-ellipsis')).toHaveText('apple')
expect(defaultselectProps.onSelect).toHaveBeenCalled()
defaultOpenMultiple.find('.kd-select-item').at(1).simulate('click')
defaultOpenMultiple.find('.kd-select-item').at(2).simulate('click')
expect(defaultselectProps.onDeselect).not.toHaveBeenCalled()
defaultOpenMultiple.find('.kd-select-item').at(2).simulate('click')
expect(defaultselectProps.onDeselect).toHaveBeenCalled()
defaultOpenMultiple.find('.kd-select-item').at(1).simulate('click')

// labelInValue
defaultOpenSingle.setProps({ labelInValue: true })
Expand Down

0 comments on commit f6d14bc

Please sign in to comment.