2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

fix: allow selecting boolean values (#1518)

This commit is contained in:
Jeff Sagal
2022-02-18 12:51:29 -08:00
committed by GitHub
parent f8a41df594
commit a1944e09e8
2 changed files with 18 additions and 1 deletions
+17
View File
@@ -213,6 +213,23 @@ describe('VS - Selecting Values', () => {
expect(Select.vm.selectedValue).toEqual(options)
})
fit('can select a false boolean option', async () => {
const Select = mountDefault({
options: [false],
})
expect(Select.vm.isOptionSelected(false)).toBeFalsy()
expect(Select.vm.optionExists(false)).toBeTruthy()
Select.vm.open = true
await Select.vm.$nextTick()
Select.find('.vs__dropdown-option').trigger('click')
await Select.vm.$nextTick()
expect(Select.vm.selectedValue).toEqual([false])
})
describe('input Event', () => {
it('will trigger the input event when the selection changes', () => {
const Select = shallowMount(VueSelect)