From 55d089bb20d9dedf94118f11179347fffa6887e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Fri, 20 Dec 2024 15:22:06 +0000 Subject: [PATCH] test(api): Set up mock for metabase client --- api.planx.uk/modules/send/s3/index.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api.planx.uk/modules/send/s3/index.test.ts b/api.planx.uk/modules/send/s3/index.test.ts index 4215e17a84..b1c3d958c9 100644 --- a/api.planx.uk/modules/send/s3/index.test.ts +++ b/api.planx.uk/modules/send/s3/index.test.ts @@ -23,6 +23,11 @@ vi.mock("../../file/service/uploadFile.js", () => ({ vi.mock("../../client/index.js"); +// Mock the Metabase client which also relies on Axios which these tests need to mock +vi.mock("../../analytics/metabase/shared/client.js", () => ({ + createMetabaseClient: vi.fn(), +})); + vi.mock("axios", () => ({ default: vi.fn(), }));