Skip to content

Commit

Permalink
test(api): Set up mock for metabase client
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Dec 20, 2024
1 parent 5d8818c commit 55d089b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api.planx.uk/modules/send/s3/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}));
Expand Down

0 comments on commit 55d089b

Please sign in to comment.