From 6a9b6728551ec270a7479ebb5073114ca9bc188c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 31 Dec 2024 10:04:34 +0000 Subject: [PATCH] Update mock imports --- packages/builder/src/stores/builder/tests/app.test.js | 2 +- packages/builder/src/stores/builder/tests/component.test.js | 2 +- packages/builder/src/stores/builder/tests/navigation.test.js | 2 +- packages/builder/src/stores/builder/tests/screens.test.js | 2 +- packages/builder/src/stores/portal/admin.test.js | 2 +- packages/builder/src/stores/portal/backups.test.js | 3 +-- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/stores/builder/tests/app.test.js b/packages/builder/src/stores/builder/tests/app.test.js index 5b4b911da6..6a7cb85bd5 100644 --- a/packages/builder/src/stores/builder/tests/app.test.js +++ b/packages/builder/src/stores/builder/tests/app.test.js @@ -10,7 +10,7 @@ import { } from "./fixtures" import { API } from "@/api" -vi.mock("api", () => { +vi.mock("@/api", () => { return { API: { fetchAppRoutes: vi.fn(), diff --git a/packages/builder/src/stores/builder/tests/component.test.js b/packages/builder/src/stores/builder/tests/component.test.js index a03c9ef091..9f700cfdbf 100644 --- a/packages/builder/src/stores/builder/tests/component.test.js +++ b/packages/builder/src/stores/builder/tests/component.test.js @@ -28,7 +28,7 @@ import { makePropSafe as safe } from "@budibase/string-templates" // Could move to fixtures const COMP_PREFIX = "@budibase/standard-components" -vi.mock("api", () => { +vi.mock("@/api", () => { return { API: { fetchComponentLibDefinitions: vi.fn(), diff --git a/packages/builder/src/stores/builder/tests/navigation.test.js b/packages/builder/src/stores/builder/tests/navigation.test.js index 0966112f48..1d04496c40 100644 --- a/packages/builder/src/stores/builder/tests/navigation.test.js +++ b/packages/builder/src/stores/builder/tests/navigation.test.js @@ -7,7 +7,7 @@ import { } from "@/stores/builder/navigation" import { appStore } from "@/stores/builder" -vi.mock("api", () => { +vi.mock("@/api", () => { return { API: { saveAppMetadata: vi.fn(), diff --git a/packages/builder/src/stores/builder/tests/screens.test.js b/packages/builder/src/stores/builder/tests/screens.test.js index b10dcb338b..430605b77a 100644 --- a/packages/builder/src/stores/builder/tests/screens.test.js +++ b/packages/builder/src/stores/builder/tests/screens.test.js @@ -57,7 +57,7 @@ vi.mock("@/stores/builder/components/utils", () => { } }) -vi.mock("api", () => { +vi.mock("@/api", () => { return { API: { fetchAppPackage: vi.fn(), diff --git a/packages/builder/src/stores/portal/admin.test.js b/packages/builder/src/stores/portal/admin.test.js index af5ed48bcf..1528042630 100644 --- a/packages/builder/src/stores/portal/admin.test.js +++ b/packages/builder/src/stores/portal/admin.test.js @@ -20,7 +20,7 @@ vi.mock("svelte/store", () => { } }) -vi.mock("api", () => { +vi.mock("@/api", () => { return { API: { getEnvironment: vi.fn(), diff --git a/packages/builder/src/stores/portal/backups.test.js b/packages/builder/src/stores/portal/backups.test.js index 86aaff7ad9..51cd13f91a 100644 --- a/packages/builder/src/stores/portal/backups.test.js +++ b/packages/builder/src/stores/portal/backups.test.js @@ -1,6 +1,5 @@ import { it, expect, describe, beforeEach, vi } from "vitest" import { createBackupsStore } from "./backups" - import { writable } from "svelte/store" import { API } from "@/api" @@ -16,7 +15,7 @@ vi.mock("svelte/store", () => { } }) -vi.mock("api", () => { +vi.mock("@/api", () => { return { API: { searchBackups: vi.fn(() => "searchBackupsReturn"),