Skip to content

Commit

Permalink
test: tests updates
Browse files Browse the repository at this point in the history
  • Loading branch information
adamberecz committed Dec 21, 2022
1 parent 58880f3 commit 98c5ae8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/unit/composables/useMultiselect.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,23 @@ describe('useMultiselect', () => {
expect(select.vm.isOpen).toBe(true)
expect(select.vm.isActive).toBe(true)
})

it('should not clearSearch if clearOnBlur is false', () => {
let select = createSelect({
value: null,
options: [1,2,3],
clearOnBlur: false,
})

select.vm.activate()

select.vm.search = 'a'

select.vm.deactivate()

jest.advanceTimersByTime(1)
expect(select.vm.search).toBe('a')
})
})

describe('handleCaretClick', () => {
Expand Down

0 comments on commit 98c5ae8

Please sign in to comment.