Skip to content

Commit 98c5ae8

Browse files
committed
test: tests updates
1 parent 58880f3 commit 98c5ae8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/unit/composables/useMultiselect.spec.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,23 @@ describe('useMultiselect', () => {
163163
expect(select.vm.isOpen).toBe(true)
164164
expect(select.vm.isActive).toBe(true)
165165
})
166+
167+
it('should not clearSearch if clearOnBlur is false', () => {
168+
let select = createSelect({
169+
value: null,
170+
options: [1,2,3],
171+
clearOnBlur: false,
172+
})
173+
174+
select.vm.activate()
175+
176+
select.vm.search = 'a'
177+
178+
select.vm.deactivate()
179+
180+
jest.advanceTimersByTime(1)
181+
expect(select.vm.search).toBe('a')
182+
})
166183
})
167184

168185
describe('handleCaretClick', () => {

0 commit comments

Comments
 (0)