2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

Fix console output in Jest runs

This commit is contained in:
Jeff
2018-08-12 13:51:09 -07:00
parent c03b634a24
commit 1c15fa0abd
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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();
});
});
+1 -1
View File
@@ -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",