From 5bb92d8963111e2a17dde2e16c775e9c8598938c Mon Sep 17 00:00:00 2001 From: Jeff Date: Sun, 10 Feb 2019 17:35:16 -0800 Subject: [PATCH] fix failing test --- tests/helpers.js | 2 +- tests/unit/Selecting.spec.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/helpers.js b/tests/helpers.js index c625289..36be948 100755 --- a/tests/helpers.js +++ b/tests/helpers.js @@ -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 diff --git a/tests/unit/Selecting.spec.js b/tests/unit/Selecting.spec.js index 3e33d99..f09242c 100755 --- a/tests/unit/Selecting.spec.js +++ b/tests/unit/Selecting.spec.js @@ -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: `
`, 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"); });