mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-29 05:14:04 +03:00
fix failing test
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { shallowMount } from "@vue/test-utils";
|
||||
import VueSelect from "../src/components/Select";
|
||||
import VueSelect from "../src/components/Select.vue";
|
||||
|
||||
/**
|
||||
* Trigger a submit event on the search
|
||||
|
||||
@@ -174,18 +174,18 @@ describe("VS - Selecting Values", () => {
|
||||
expect(Select.vm.isOptionSelected({ label: "one" })).toEqual(true);
|
||||
});
|
||||
|
||||
it("can use v-model syntax for a two way binding to a parent component", () => {
|
||||
it.only("can use v-model syntax for a two way binding to a parent component", () => {
|
||||
const Parent = mount({
|
||||
data: () => ({ value: "foo", options: ["foo", "bar", "baz"] }),
|
||||
template: `<div><v-select :options="options" v-model="value" /></div>`,
|
||||
components: { "v-select": VueSelect }
|
||||
});
|
||||
const Select = Parent.find(VueSelect);
|
||||
const Select = Parent.vm.$children[0];
|
||||
|
||||
expect(Select.vm.value).toEqual("foo");
|
||||
expect(Select.vm.mutableValue).toEqual("foo");
|
||||
expect(Select.value).toEqual("foo");
|
||||
expect(Select.mutableValue).toEqual("foo");
|
||||
|
||||
Select.vm.mutableValue = "bar";
|
||||
Select.select("bar");
|
||||
expect(Parent.vm.value).toEqual("bar");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user