Skip to content

Commit 5bb92d8

Browse files
author
Jeff
committed
fix failing test
1 parent b17fce0 commit 5bb92d8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { shallowMount } from "@vue/test-utils";
2-
import VueSelect from "../src/components/Select";
2+
import VueSelect from "../src/components/Select.vue";
33

44
/**
55
* Trigger a submit event on the search

tests/unit/Selecting.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,18 @@ describe("VS - Selecting Values", () => {
174174
expect(Select.vm.isOptionSelected({ label: "one" })).toEqual(true);
175175
});
176176

177-
it("can use v-model syntax for a two way binding to a parent component", () => {
177+
it.only("can use v-model syntax for a two way binding to a parent component", () => {
178178
const Parent = mount({
179179
data: () => ({ value: "foo", options: ["foo", "bar", "baz"] }),
180180
template: `<div><v-select :options="options" v-model="value" /></div>`,
181181
components: { "v-select": VueSelect }
182182
});
183-
const Select = Parent.find(VueSelect);
183+
const Select = Parent.vm.$children[0];
184184

185-
expect(Select.vm.value).toEqual("foo");
186-
expect(Select.vm.mutableValue).toEqual("foo");
185+
expect(Select.value).toEqual("foo");
186+
expect(Select.mutableValue).toEqual("foo");
187187

188-
Select.vm.mutableValue = "bar";
188+
Select.select("bar");
189189
expect(Parent.vm.value).toEqual("bar");
190190
});
191191

0 commit comments

Comments
 (0)