From 24fc72657ddd6bff35fa3651ff9a406359d54da5 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 30 Mar 2023 16:35:25 +0100 Subject: [PATCH] Fixing all broken test cases after breaking out context fully from jestSetup/backend-core jest loading. --- packages/backend-core/src/auth/tests/auth.spec.ts | 2 +- .../src/cache/tests/writethrough.spec.ts | 7 ++----- .../backend-core/src/configs/tests/configs.spec.ts | 8 ++------ packages/backend-core/src/context/mainContext.ts | 2 +- .../backend-core/src/context/tests/index.spec.ts | 2 +- packages/backend-core/src/db/couch/DatabaseImpl.ts | 2 +- packages/backend-core/src/db/documents/index.ts | 2 -- packages/backend-core/src/db/index.ts | 2 +- packages/backend-core/src/db/tests/lucene.spec.ts | 2 +- packages/backend-core/src/db/tests/utils.spec.ts | 2 +- packages/backend-core/src/db/utils.ts | 12 ++++-------- .../backend-core/src/{db => docIds}/conversions.ts | 0 .../backend-core/src/{db/documents => docIds}/ids.ts | 4 ++-- packages/backend-core/src/docIds/index.ts | 2 ++ packages/backend-core/src/{ => docIds}/newid.ts | 0 .../src/{db/documents => docIds}/params.ts | 6 ++---- .../posthog/tests/PosthogProcessor.spec.ts | 2 +- .../src/middleware/passport/sso/tests/sso.spec.ts | 3 ++- .../src/migrations/tests/migrations.spec.ts | 2 +- .../src/objectStore/buckets/tests/app.spec.ts | 2 +- .../src/objectStore/buckets/tests/global.spec.ts | 2 +- .../src/objectStore/buckets/tests/plugins.spec.ts | 3 ++- .../backend-core/src/platform/tests/tenants.spec.ts | 3 ++- packages/backend-core/src/utils/hashing.ts | 2 +- packages/backend-core/src/utils/tests/utils.spec.ts | 3 ++- packages/backend-core/tests/core/index.ts | 1 - .../tests/core/utilities/mocks/events.ts | 2 +- .../backend-core/tests/core/utilities/mocks/fetch.ts | 9 ++++++++- .../backend-core/tests/core/utilities/mocks/index.ts | 4 ++-- .../tests/core/utilities/structures/accounts.ts | 2 +- .../tests/core/utilities/structures/apps.ts | 2 +- .../tests/core/utilities/structures/db.ts | 2 +- .../tests/core/utilities/structures/tenants.ts | 2 +- .../backend-core/tests/extra/DBTestConfiguration.ts | 4 ++-- packages/backend-core/tests/extra/index.ts | 2 +- packages/backend-core/tests/extra/testEnv.ts | 2 +- packages/backend-core/tests/index.ts | 1 + packages/backend-core/tests/{core => }/jestEnv.ts | 0 packages/backend-core/tests/{core => }/jestSetup.ts | 4 ++-- 39 files changed, 56 insertions(+), 58 deletions(-) delete mode 100644 packages/backend-core/src/db/documents/index.ts rename packages/backend-core/src/{db => docIds}/conversions.ts (100%) rename packages/backend-core/src/{db/documents => docIds}/ids.ts (98%) create mode 100644 packages/backend-core/src/docIds/index.ts rename packages/backend-core/src/{ => docIds}/newid.ts (100%) rename packages/backend-core/src/{db/documents => docIds}/params.ts (98%) delete mode 100644 packages/backend-core/tests/core/index.ts create mode 100644 packages/backend-core/tests/index.ts rename packages/backend-core/tests/{core => }/jestEnv.ts (100%) rename packages/backend-core/tests/{core => }/jestSetup.ts (87%) diff --git a/packages/backend-core/src/auth/tests/auth.spec.ts b/packages/backend-core/src/auth/tests/auth.spec.ts index 7cd393d862..3ae691be58 100644 --- a/packages/backend-core/src/auth/tests/auth.spec.ts +++ b/packages/backend-core/src/auth/tests/auth.spec.ts @@ -1,4 +1,4 @@ -import { structures } from "../../../tests/core" +import { structures } from "../../../tests" import { testEnv } from "../../../tests/extra" import * as auth from "../auth" import * as events from "../../events" diff --git a/packages/backend-core/src/cache/tests/writethrough.spec.ts b/packages/backend-core/src/cache/tests/writethrough.spec.ts index a34f05e881..b4ae4624f8 100644 --- a/packages/backend-core/src/cache/tests/writethrough.spec.ts +++ b/packages/backend-core/src/cache/tests/writethrough.spec.ts @@ -1,8 +1,5 @@ -import { - structures, - DBTestConfiguration, - expectFunctionWasCalledTimesWith, -} from "../../../tests" +import { structures, expectFunctionWasCalledTimesWith } from "../../../tests" +import { DBTestConfiguration } from "../../../tests/extra" import { Writethrough } from "../writethrough" import { getDB } from "../../db" import tk from "timekeeper" diff --git a/packages/backend-core/src/configs/tests/configs.spec.ts b/packages/backend-core/src/configs/tests/configs.spec.ts index 45e56a2581..2c6a1948ec 100644 --- a/packages/backend-core/src/configs/tests/configs.spec.ts +++ b/packages/backend-core/src/configs/tests/configs.spec.ts @@ -1,9 +1,5 @@ -import { - DBTestConfiguration, - generator, - testEnv, - structures, -} from "../../../tests" +import { generator, structures } from "../../../tests" +import { DBTestConfiguration, testEnv } from "../../../tests/extra" import { ConfigType } from "@budibase/types" import env from "../../environment" import * as configs from "../configs" diff --git a/packages/backend-core/src/context/mainContext.ts b/packages/backend-core/src/context/mainContext.ts index 02ba16aa8c..7e02e60133 100644 --- a/packages/backend-core/src/context/mainContext.ts +++ b/packages/backend-core/src/context/mainContext.ts @@ -2,7 +2,7 @@ // store an app ID to pretend there is a context import env from "../environment" import Context from "./Context" -import * as conversions from "../db/conversions" +import * as conversions from "../docIds/conversions" import { getDB } from "../db/db" import { DocumentType, diff --git a/packages/backend-core/src/context/tests/index.spec.ts b/packages/backend-core/src/context/tests/index.spec.ts index 5c8ce6fc19..df1f319cab 100644 --- a/packages/backend-core/src/context/tests/index.spec.ts +++ b/packages/backend-core/src/context/tests/index.spec.ts @@ -1,4 +1,4 @@ -import { testEnv } from "../../../tests" +import { testEnv } from "../../../tests/extra" const context = require("../") const { DEFAULT_TENANT_ID } = require("../../constants") diff --git a/packages/backend-core/src/db/couch/DatabaseImpl.ts b/packages/backend-core/src/db/couch/DatabaseImpl.ts index a3a398950b..94d78e94ff 100644 --- a/packages/backend-core/src/db/couch/DatabaseImpl.ts +++ b/packages/backend-core/src/db/couch/DatabaseImpl.ts @@ -15,7 +15,7 @@ import { getCouchInfo } from "./connections" import { directCouchCall } from "./utils" import { getPouchDB } from "./pouchDB" import { WriteStream, ReadStream } from "fs" -import { newid } from "../../newid" +import { newid } from "../../docIds/newid" function buildNano(couchInfo: { url: string; cookie: string }) { return Nano({ diff --git a/packages/backend-core/src/db/documents/index.ts b/packages/backend-core/src/db/documents/index.ts deleted file mode 100644 index efa3b1f3f8..0000000000 --- a/packages/backend-core/src/db/documents/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./ids" -export * from "./params" \ No newline at end of file diff --git a/packages/backend-core/src/db/index.ts b/packages/backend-core/src/db/index.ts index a569b17b36..7ac6b53323 100644 --- a/packages/backend-core/src/db/index.ts +++ b/packages/backend-core/src/db/index.ts @@ -2,7 +2,7 @@ export * from "./couch" export * from "./db" export * from "./utils" export * from "./views" -export * from "./conversions" +export * from "../docIds/conversions" export { default as Replication } from "./Replication" // exports to support old export structure export * from "../constants/db" diff --git a/packages/backend-core/src/db/tests/lucene.spec.ts b/packages/backend-core/src/db/tests/lucene.spec.ts index 52017cc94c..cedfc9ee56 100644 --- a/packages/backend-core/src/db/tests/lucene.spec.ts +++ b/packages/backend-core/src/db/tests/lucene.spec.ts @@ -1,4 +1,4 @@ -import { newid } from "../../newid" +import { newid } from "../../docIds/newid" import { getDB } from "../db" import { Database } from "@budibase/types" import { QueryBuilder, paginatedSearch, fullSearch } from "../lucene" diff --git a/packages/backend-core/src/db/tests/utils.spec.ts b/packages/backend-core/src/db/tests/utils.spec.ts index 138457c65e..d9cb09a791 100644 --- a/packages/backend-core/src/db/tests/utils.spec.ts +++ b/packages/backend-core/src/db/tests/utils.spec.ts @@ -3,7 +3,7 @@ import { getProdAppID, isDevAppID, isProdAppID, -} from "../conversions" +} from "../../docIds/conversions" import { generateAppID } from "../utils" describe("utils", () => { diff --git a/packages/backend-core/src/db/utils.ts b/packages/backend-core/src/db/utils.ts index ce1990451b..3c32d5709e 100644 --- a/packages/backend-core/src/db/utils.ts +++ b/packages/backend-core/src/db/utils.ts @@ -1,16 +1,12 @@ import env from "../environment" -import { - DEFAULT_TENANT_ID, - SEPARATOR, - DocumentType, -} from "../constants" +import { DEFAULT_TENANT_ID, SEPARATOR, DocumentType } from "../constants" import { getTenantId, getGlobalDBName } from "../context" import { doWithDB, directCouchAllDbs } from "./db" import { getAppMetadata } from "../cache/appMetadata" -import { isDevApp, isDevAppID, getProdAppID } from "./conversions" +import { isDevApp, isDevAppID, getProdAppID } from "../docIds/conversions" import { App, Database } from "@budibase/types" -import { getStartEndKeyURL } from "./documents" -export * from "./documents" +import { getStartEndKeyURL } from "../docIds" +export * from "../docIds" /** * if in production this will use the CouchDB _all_dbs call to retrieve a list of databases. If testing diff --git a/packages/backend-core/src/db/conversions.ts b/packages/backend-core/src/docIds/conversions.ts similarity index 100% rename from packages/backend-core/src/db/conversions.ts rename to packages/backend-core/src/docIds/conversions.ts diff --git a/packages/backend-core/src/db/documents/ids.ts b/packages/backend-core/src/docIds/ids.ts similarity index 98% rename from packages/backend-core/src/db/documents/ids.ts rename to packages/backend-core/src/docIds/ids.ts index 28196c5318..152977b3af 100644 --- a/packages/backend-core/src/db/documents/ids.ts +++ b/packages/backend-core/src/docIds/ids.ts @@ -3,8 +3,8 @@ import { DocumentType, InternalTable, SEPARATOR, -} from "../../constants" -import { newid } from "../../newid" +} from "../constants" +import { newid } from "./newid" /** * Generates a new app ID. diff --git a/packages/backend-core/src/docIds/index.ts b/packages/backend-core/src/docIds/index.ts new file mode 100644 index 0000000000..1d22b375be --- /dev/null +++ b/packages/backend-core/src/docIds/index.ts @@ -0,0 +1,2 @@ +export * from "./ids" +export * from "./params" diff --git a/packages/backend-core/src/newid.ts b/packages/backend-core/src/docIds/newid.ts similarity index 100% rename from packages/backend-core/src/newid.ts rename to packages/backend-core/src/docIds/newid.ts diff --git a/packages/backend-core/src/db/documents/params.ts b/packages/backend-core/src/docIds/params.ts similarity index 98% rename from packages/backend-core/src/db/documents/params.ts rename to packages/backend-core/src/docIds/params.ts index 2594daac56..5d563952f7 100644 --- a/packages/backend-core/src/db/documents/params.ts +++ b/packages/backend-core/src/docIds/params.ts @@ -4,8 +4,8 @@ import { SEPARATOR, UNICODE_MAX, ViewName, -} from "../../constants" -import { getProdAppID } from "../conversions" +} from "../constants" +import { getProdAppID } from "./conversions" /** * If creating DB allDocs/query params with only a single top level ID this can be used, this @@ -63,7 +63,6 @@ export function getQueryIndex(viewName: ViewName) { return `database/${viewName}` } - /** * Check if a given ID is that of a table. * @returns {boolean} @@ -122,7 +121,6 @@ export function getUserMetadataParams(userId?: string | null, otherProps = {}) { return getRowParams(InternalTable.USER_METADATA, userId, otherProps) } - export function getUsersByAppParams(appId: any, otherProps: any = {}) { const prodAppId = getProdAppID(appId) return { diff --git a/packages/backend-core/src/events/processors/posthog/tests/PosthogProcessor.spec.ts b/packages/backend-core/src/events/processors/posthog/tests/PosthogProcessor.spec.ts index 8df4e40bcf..0722fc3293 100644 --- a/packages/backend-core/src/events/processors/posthog/tests/PosthogProcessor.spec.ts +++ b/packages/backend-core/src/events/processors/posthog/tests/PosthogProcessor.spec.ts @@ -1,4 +1,4 @@ -import { testEnv } from "../../../../../tests" +import { testEnv } from "../../../../../tests/extra" import PosthogProcessor from "../PosthogProcessor" import { Event, IdentityType, Hosting } from "@budibase/types" const tk = require("timekeeper") diff --git a/packages/backend-core/src/middleware/passport/sso/tests/sso.spec.ts b/packages/backend-core/src/middleware/passport/sso/tests/sso.spec.ts index ae42fc01ea..484a118cbd 100644 --- a/packages/backend-core/src/middleware/passport/sso/tests/sso.spec.ts +++ b/packages/backend-core/src/middleware/passport/sso/tests/sso.spec.ts @@ -1,4 +1,5 @@ -import { structures, testEnv, mocks } from "../../../../../tests" +import { structures, mocks } from "../../../../../tests" +import { testEnv } from "../../../../../tests/extra" import { SSOAuthDetails, User } from "@budibase/types" import { HTTPError } from "../../../../errors" diff --git a/packages/backend-core/src/migrations/tests/migrations.spec.ts b/packages/backend-core/src/migrations/tests/migrations.spec.ts index c74ab816c1..af2eb33cf5 100644 --- a/packages/backend-core/src/migrations/tests/migrations.spec.ts +++ b/packages/backend-core/src/migrations/tests/migrations.spec.ts @@ -1,4 +1,4 @@ -import { testEnv, DBTestConfiguration } from "../../../tests" +import { testEnv, DBTestConfiguration } from "../../../tests/extra" import * as migrations from "../index" import * as context from "../../context" import { MigrationType } from "@budibase/types" diff --git a/packages/backend-core/src/objectStore/buckets/tests/app.spec.ts b/packages/backend-core/src/objectStore/buckets/tests/app.spec.ts index 0375e97cbc..aaa07ec9d3 100644 --- a/packages/backend-core/src/objectStore/buckets/tests/app.spec.ts +++ b/packages/backend-core/src/objectStore/buckets/tests/app.spec.ts @@ -1,6 +1,6 @@ import * as app from "../app" import { getAppFileUrl } from "../app" -import { testEnv } from "../../../../tests" +import { testEnv } from "../../../../tests/extra" describe("app", () => { beforeEach(() => { diff --git a/packages/backend-core/src/objectStore/buckets/tests/global.spec.ts b/packages/backend-core/src/objectStore/buckets/tests/global.spec.ts index b495812356..148a4c80bf 100644 --- a/packages/backend-core/src/objectStore/buckets/tests/global.spec.ts +++ b/packages/backend-core/src/objectStore/buckets/tests/global.spec.ts @@ -1,5 +1,5 @@ import * as global from "../global" -import { testEnv } from "../../../../tests" +import { testEnv } from "../../../../tests/extra" describe("global", () => { describe("getGlobalFileUrl", () => { diff --git a/packages/backend-core/src/objectStore/buckets/tests/plugins.spec.ts b/packages/backend-core/src/objectStore/buckets/tests/plugins.spec.ts index affb8d8318..fc2822314e 100644 --- a/packages/backend-core/src/objectStore/buckets/tests/plugins.spec.ts +++ b/packages/backend-core/src/objectStore/buckets/tests/plugins.spec.ts @@ -1,5 +1,6 @@ import * as plugins from "../plugins" -import { structures, testEnv } from "../../../../tests" +import { structures } from "../../../../tests" +import { testEnv } from "../../../../tests/extra" describe("plugins", () => { describe("enrichPluginURLs", () => { diff --git a/packages/backend-core/src/platform/tests/tenants.spec.ts b/packages/backend-core/src/platform/tests/tenants.spec.ts index 92e999cb2d..b2ab75c954 100644 --- a/packages/backend-core/src/platform/tests/tenants.spec.ts +++ b/packages/backend-core/src/platform/tests/tenants.spec.ts @@ -1,4 +1,5 @@ -import { DBTestConfiguration, structures } from "../../../tests" +import { structures } from "../../../tests" +import { DBTestConfiguration } from "../../../tests/extra" import * as tenants from "../tenants" describe("tenants", () => { diff --git a/packages/backend-core/src/utils/hashing.ts b/packages/backend-core/src/utils/hashing.ts index 220ffea47f..aba11f38e6 100644 --- a/packages/backend-core/src/utils/hashing.ts +++ b/packages/backend-core/src/utils/hashing.ts @@ -1,5 +1,5 @@ import env from "../environment" -export * from "../newid" +export * from "../docIds/newid" const bcrypt = env.JS_BCRYPT ? require("bcryptjs") : require("bcrypt") const SALT_ROUNDS = env.SALT_ROUNDS || 10 diff --git a/packages/backend-core/src/utils/tests/utils.spec.ts b/packages/backend-core/src/utils/tests/utils.spec.ts index 7d6c5561e8..ededa48628 100644 --- a/packages/backend-core/src/utils/tests/utils.spec.ts +++ b/packages/backend-core/src/utils/tests/utils.spec.ts @@ -1,4 +1,5 @@ -import { structures, DBTestConfiguration } from "../../../tests" +import { structures } from "../../../tests" +import { DBTestConfiguration } from "../../../tests/extra" import * as utils from "../../utils" import * as db from "../../db" import { Header } from "../../constants" diff --git a/packages/backend-core/tests/core/index.ts b/packages/backend-core/tests/core/index.ts deleted file mode 100644 index b23d52e6e0..0000000000 --- a/packages/backend-core/tests/core/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./utilities" diff --git a/packages/backend-core/tests/core/utilities/mocks/events.ts b/packages/backend-core/tests/core/utilities/mocks/events.ts index 306f7a6cd6..2ff5f380e6 100644 --- a/packages/backend-core/tests/core/utilities/mocks/events.ts +++ b/packages/backend-core/tests/core/utilities/mocks/events.ts @@ -1 +1 @@ -jest.mock("../../../src/events") +jest.mock("../../../../src/events") diff --git a/packages/backend-core/tests/core/utilities/mocks/fetch.ts b/packages/backend-core/tests/core/utilities/mocks/fetch.ts index eeb0ccda45..287280067a 100644 --- a/packages/backend-core/tests/core/utilities/mocks/fetch.ts +++ b/packages/backend-core/tests/core/utilities/mocks/fetch.ts @@ -1,4 +1,11 @@ -const mockFetch = jest.fn() +const mockFetch = jest.fn((url: any, opts: any) => { + const fetch = jest.requireActual("node-fetch") + const env = jest.requireActual("../../../../src/environment").default + if (url.includes(env.COUCH_DB_URL)) { + return fetch(url, opts) + } + return undefined +}) const enable = () => { jest.mock("node-fetch", () => mockFetch) diff --git a/packages/backend-core/tests/core/utilities/mocks/index.ts b/packages/backend-core/tests/core/utilities/mocks/index.ts index f5f45c0342..ea84d6b7a0 100644 --- a/packages/backend-core/tests/core/utilities/mocks/index.ts +++ b/packages/backend-core/tests/core/utilities/mocks/index.ts @@ -1,5 +1,5 @@ -jest.mock("../../../src/accounts") -import * as _accounts from "../../../src/accounts" +jest.mock("../../../../src/accounts") +import * as _accounts from "../../../../src/accounts" export const accounts = jest.mocked(_accounts) export * as date from "./date" diff --git a/packages/backend-core/tests/core/utilities/structures/accounts.ts b/packages/backend-core/tests/core/utilities/structures/accounts.ts index f4ad0b9ab6..30ef6e4192 100644 --- a/packages/backend-core/tests/core/utilities/structures/accounts.ts +++ b/packages/backend-core/tests/core/utilities/structures/accounts.ts @@ -1,5 +1,5 @@ import { generator, uuid } from "." -import { generateGlobalUserID } from "../../../src/db/documents" +import { generateGlobalUserID } from "../../../../src/docIds" import { Account, AccountSSOProvider, diff --git a/packages/backend-core/tests/core/utilities/structures/apps.ts b/packages/backend-core/tests/core/utilities/structures/apps.ts index f3743d99b2..812d6d8177 100644 --- a/packages/backend-core/tests/core/utilities/structures/apps.ts +++ b/packages/backend-core/tests/core/utilities/structures/apps.ts @@ -1,6 +1,6 @@ import { generator } from "." import { App } from "@budibase/types" -import { DEFAULT_TENANT_ID, DocumentType } from "../../../src/constants" +import { DEFAULT_TENANT_ID, DocumentType } from "../../../../src/constants" export function app(id: string): App { return { diff --git a/packages/backend-core/tests/core/utilities/structures/db.ts b/packages/backend-core/tests/core/utilities/structures/db.ts index f4a677e777..31a52dce8b 100644 --- a/packages/backend-core/tests/core/utilities/structures/db.ts +++ b/packages/backend-core/tests/core/utilities/structures/db.ts @@ -1,5 +1,5 @@ import { structures } from ".." -import { newid } from "../../../src/newid" +import { newid } from "../../../../src/docIds/newid" export function id() { return `db_${newid()}` diff --git a/packages/backend-core/tests/core/utilities/structures/tenants.ts b/packages/backend-core/tests/core/utilities/structures/tenants.ts index b23bc8be75..ec2e67109b 100644 --- a/packages/backend-core/tests/core/utilities/structures/tenants.ts +++ b/packages/backend-core/tests/core/utilities/structures/tenants.ts @@ -1,4 +1,4 @@ -import { newid } from "../../../src/newid" +import { newid } from "../../../../src/docIds/newid" export function id() { return `tenant-${newid()}` diff --git a/packages/backend-core/tests/extra/DBTestConfiguration.ts b/packages/backend-core/tests/extra/DBTestConfiguration.ts index e5e57a99a3..a2550a6e24 100644 --- a/packages/backend-core/tests/extra/DBTestConfiguration.ts +++ b/packages/backend-core/tests/extra/DBTestConfiguration.ts @@ -1,5 +1,5 @@ -import "./mocks" -import * as structures from "./structures" +import "../core/utilities/mocks" +import * as structures from "../core/utilities/structures" import * as testEnv from "./testEnv" import * as context from "../../src/context" diff --git a/packages/backend-core/tests/extra/index.ts b/packages/backend-core/tests/extra/index.ts index bf4cc7c7f7..b5d734090c 100644 --- a/packages/backend-core/tests/extra/index.ts +++ b/packages/backend-core/tests/extra/index.ts @@ -1,2 +1,2 @@ export * as testEnv from "./testEnv" -export * as DBTestConfiguration from "./DBTestConfiguration" +export { default as DBTestConfiguration } from "./DBTestConfiguration" diff --git a/packages/backend-core/tests/extra/testEnv.ts b/packages/backend-core/tests/extra/testEnv.ts index df07f96c25..2b9628e44d 100644 --- a/packages/backend-core/tests/extra/testEnv.ts +++ b/packages/backend-core/tests/extra/testEnv.ts @@ -1,6 +1,6 @@ import env from "../../src/environment" import * as context from "../../src/context" -import * as structures from "../core" +import * as structures from "../core/utilities/structures" // TENANCY diff --git a/packages/backend-core/tests/index.ts b/packages/backend-core/tests/index.ts new file mode 100644 index 0000000000..50fc1dc431 --- /dev/null +++ b/packages/backend-core/tests/index.ts @@ -0,0 +1 @@ +export * from "./core/utilities" diff --git a/packages/backend-core/tests/core/jestEnv.ts b/packages/backend-core/tests/jestEnv.ts similarity index 100% rename from packages/backend-core/tests/core/jestEnv.ts rename to packages/backend-core/tests/jestEnv.ts diff --git a/packages/backend-core/tests/core/jestSetup.ts b/packages/backend-core/tests/jestSetup.ts similarity index 87% rename from packages/backend-core/tests/core/jestSetup.ts rename to packages/backend-core/tests/jestSetup.ts index be81fbff75..42a24ce733 100644 --- a/packages/backend-core/tests/core/jestSetup.ts +++ b/packages/backend-core/tests/jestSetup.ts @@ -1,7 +1,7 @@ -import "./logging" +import "./core/logging" import env from "../src/environment" import { cleanup } from "../src/timers" -import { mocks, testContainerUtils } from "./utilities" +import { mocks, testContainerUtils } from "./core/utilities" // must explicitly enable fetch mock mocks.fetch.enable()