diff --git a/tests/unit/Labels.spec.js b/tests/unit/Labels.spec.js index cc9a28d..0554be0 100644 --- a/tests/unit/Labels.spec.js +++ b/tests/unit/Labels.spec.js @@ -13,7 +13,7 @@ describe("Labels", () => { }); it("will console.warn when options contain objects without a valid label key", () => { - const spy = jest.spyOn(console, "warn"); + const spy = jest.spyOn(console, "warn").mockImplementation(() => {}); const Select = selectWithProps({ options: [{}] }); @@ -28,7 +28,7 @@ describe("Labels", () => { it("should display a placeholder if the value is empty", () => { const Select = shallowMount(VueSelect, { propsData: { - options: [{ label: "one" }] + options: ["one"] }, attrs: { placeholder: "foo" @@ -36,7 +36,7 @@ describe("Labels", () => { }); expect(Select.vm.searchPlaceholder).toEqual("foo"); - Select.vm.mutableValue = { label: "one" }; + Select.vm.mutableValue = "one"; expect(Select.vm.searchPlaceholder).not.toBeDefined(); }); }); diff --git a/tests/unit/ObjectIndex.spec.js b/tests/unit/ObjectIndex.spec.js index a8d9d93..530dc1a 100644 --- a/tests/unit/ObjectIndex.spec.js +++ b/tests/unit/ObjectIndex.spec.js @@ -141,7 +141,7 @@ describe("When index prop is defined", () => { }); it("will console.warn when attempting to select an option with an undefined index", () => { - const spy = jest.spyOn(console, "warn"); + const spy = jest.spyOn(console, "warn").mockImplementation(() => {}); const Select = shallowMount(VueSelect, { propsData: { index: "value",