2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

refactor: apply eslint fixes (#1469)

This commit is contained in:
Jeff Sagal
2021-08-01 12:30:50 -07:00
committed by GitHub
parent a64ffc32d0
commit dd281aa8c6
85 changed files with 3616 additions and 3208 deletions
+22 -22
View File
@@ -1,30 +1,30 @@
import { shallowMount } from "@vue/test-utils";
import VueSelect from "../../src/components/Select";
import { shallowMount } from '@vue/test-utils'
import VueSelect from '../../src/components/Select'
describe("Single value options", () => {
it("should reset the search input on focus lost", () => {
const Select = shallowMount(VueSelect);
Select.vm.open = true;
describe('Single value options', () => {
it('should reset the search input on focus lost', () => {
const Select = shallowMount(VueSelect)
Select.vm.open = true
Select.vm.search = "t";
expect(Select.vm.search).toEqual("t");
Select.vm.search = 't'
expect(Select.vm.search).toEqual('t')
Select.vm.onSearchBlur();
expect(Select.vm.search).toEqual("");
});
Select.vm.onSearchBlur()
expect(Select.vm.search).toEqual('')
})
it("should not reset the search input on focus lost when clearSearchOnSelect is false", () => {
it('should not reset the search input on focus lost when clearSearchOnSelect is false', () => {
const Select = shallowMount(VueSelect, {
propsData: { value: "foo", clearSearchOnSelect: false }
});
propsData: { value: 'foo', clearSearchOnSelect: false },
})
expect(Select.vm.clearSearchOnSelect).toEqual(false);
expect(Select.vm.clearSearchOnSelect).toEqual(false)
Select.vm.open = true;
Select.vm.search = "t";
expect(Select.vm.search).toEqual("t");
Select.vm.open = true
Select.vm.search = 't'
expect(Select.vm.search).toEqual('t')
Select.vm.onSearchBlur();
expect(Select.vm.search).toEqual("t");
});
});
Select.vm.onSearchBlur()
expect(Select.vm.search).toEqual('t')
})
})