mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-16 09:10:33 +03:00
switch to vue cli for build
This commit is contained in:
@@ -4,7 +4,7 @@ describe("Selectable prop", () => {
|
||||
it("should select selectable option if clicked", async () => {
|
||||
const Select = selectWithProps({
|
||||
options: ["one", "two", "three"],
|
||||
selectable: (option) => option === "one"
|
||||
selectable: option => option === "one"
|
||||
});
|
||||
|
||||
Select.vm.$data.open = true;
|
||||
@@ -14,12 +14,12 @@ describe("Selectable prop", () => {
|
||||
|
||||
await Select.vm.$nextTick();
|
||||
expect(Select.vm.selectedValue).toEqual(["one"]);
|
||||
})
|
||||
});
|
||||
|
||||
it("should not select not selectable option if clicked", async () => {
|
||||
const Select = selectWithProps({
|
||||
options: ["one", "two", "three"],
|
||||
selectable: (option) => option === "one"
|
||||
selectable: option => option === "one"
|
||||
});
|
||||
|
||||
Select.vm.$data.open = true;
|
||||
@@ -34,7 +34,7 @@ describe("Selectable prop", () => {
|
||||
it("should skip non-selectable option on down arrow keyDown", () => {
|
||||
const Select = selectWithProps({
|
||||
options: ["one", "two", "three"],
|
||||
selectable: (option) => option !== "two"
|
||||
selectable: option => option !== "two"
|
||||
});
|
||||
|
||||
Select.vm.typeAheadPointer = 1;
|
||||
@@ -42,12 +42,12 @@ describe("Selectable prop", () => {
|
||||
Select.find({ ref: "search" }).trigger("keydown.down");
|
||||
|
||||
expect(Select.vm.typeAheadPointer).toEqual(2);
|
||||
})
|
||||
});
|
||||
|
||||
it("should skip non-selectable option on up arrow keyDown", () => {
|
||||
const Select = selectWithProps({
|
||||
options: ["one", "two", "three"],
|
||||
selectable: (option) => option !== "two"
|
||||
selectable: option => option !== "two"
|
||||
});
|
||||
|
||||
Select.vm.typeAheadPointer = 2;
|
||||
@@ -55,5 +55,5 @@ describe("Selectable prop", () => {
|
||||
Select.find({ ref: "search" }).trigger("keydown.up");
|
||||
|
||||
expect(Select.vm.typeAheadPointer).toEqual(0);
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user