diff --git a/client/src/components/admin/Notifications/NotificationForm.test.ts b/client/src/components/admin/Notifications/NotificationForm.test.ts index 3f27b6d584e4..39240583af98 100644 --- a/client/src/components/admin/Notifications/NotificationForm.test.ts +++ b/client/src/components/admin/Notifications/NotificationForm.test.ts @@ -5,9 +5,13 @@ import flushPromises from "flush-promises"; import { setActivePinia } from "pinia"; import type Vue from "vue"; +import { useServerMock } from "@/api/client/__mocks__"; + import NotificationForm from "./NotificationForm.vue"; -jest.mock("@/api/schema"); +// Even though we don't use the API endpoints, this seems to prevent failure fetching +// openapi during jest testing. +useServerMock(); const SUBMIT_BUTTON_SELECTOR = "#notification-submit"; @@ -46,5 +50,7 @@ describe("NotificationForm.vue", () => { const { wrapper } = await mountNotificationForm(); expectSubmitButton(wrapper, false); + + await flushPromises(); }); });