From 89b1332817d43c7aaeb4d57cb52a820117ed48ad Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 21 Nov 2024 19:52:38 -0500 Subject: [PATCH] Cleanup logging for Masthead.test.js. --- client/src/components/Masthead/Masthead.test.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/client/src/components/Masthead/Masthead.test.js b/client/src/components/Masthead/Masthead.test.js index b45b9f60bbf4..bb42d0026b1d 100644 --- a/client/src/components/Masthead/Masthead.test.js +++ b/client/src/components/Masthead/Masthead.test.js @@ -5,8 +5,8 @@ import flushPromises from "flush-promises"; import { WindowManager } from "layout/window-manager"; import { PiniaVuePlugin } from "pinia"; import { getLocalVue } from "tests/jest/helpers"; +import { setupMockConfig } from "tests/jest/mockConfig"; -import { useServerMock } from "@/api/client/__mocks__"; import { useUserStore } from "@/stores/userStore"; import { loadWebhookMenuItems } from "./_webhooks"; @@ -20,10 +20,10 @@ jest.mock("vue-router/composables", () => ({ useRouter: jest.fn(), })); -const { server, http } = useServerMock(); - const currentUser = getFakeRegisteredUser(); +setupMockConfig({}); + describe("Masthead.vue", () => { let wrapper; let localVue; @@ -45,12 +45,6 @@ describe("Masthead.vue", () => { localVue.use(PiniaVuePlugin); testPinia = createTestingPinia(); - server.use( - http.get("/api/configuration", ({ response }) => { - return response(200).json({}); - }) - ); - windowManager = new WindowManager({}); const windowTab = windowManager.getTab(); @@ -63,6 +57,9 @@ describe("Masthead.vue", () => { }, localVue, pinia: testPinia, + stubs: { + Icon: true, + }, }); await flushPromises(); });