2
0
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:
Jeff
2019-02-10 17:35:16 -08:00
parent b17fce0ad8
commit 5bb92d8963
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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");
});