From 00e7cf69041e084d1fb8581625e3d30abf7e9848 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 31 Dec 2024 09:37:49 +0000 Subject: [PATCH] Add more vitest mocking to try to get tests to pass --- packages/builder/src/stores/portal/admin.test.js | 7 ++++++- packages/builder/src/stores/portal/backups.test.js | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/stores/portal/admin.test.js b/packages/builder/src/stores/portal/admin.test.js index 831e1b0bc47..af5ed48bcf7 100644 --- a/packages/builder/src/stores/portal/admin.test.js +++ b/packages/builder/src/stores/portal/admin.test.js @@ -31,7 +31,12 @@ vi.mock("api", () => { }) vi.mock("@budibase/bbui", () => { - return { banner: { showStatus: vi.fn() } } + return { + banner: { showStatus: vi.fn() }, + Helpers: { + uuid: vi.fn(), + }, + } }) describe("admin store", () => { diff --git a/packages/builder/src/stores/portal/backups.test.js b/packages/builder/src/stores/portal/backups.test.js index c4da6784ab4..86aaff7ad9a 100644 --- a/packages/builder/src/stores/portal/backups.test.js +++ b/packages/builder/src/stores/portal/backups.test.js @@ -10,6 +10,9 @@ vi.mock("svelte/store", () => { subscribe: vi.fn(), update: vi.fn(), })), + derived: vi.fn(() => ({ + subscribe: vi.fn(), + })), } })