From de613d2b2864be56a9fe245540d2675a1202c7e4 Mon Sep 17 00:00:00 2001 From: Mateus Badan de Pieri Date: Tue, 11 Apr 2023 10:22:47 +0100 Subject: [PATCH] latest version --- .../backend-core/src/tenancy/tests/tenancy.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/backend-core/src/tenancy/tests/tenancy.spec.ts b/packages/backend-core/src/tenancy/tests/tenancy.spec.ts index 05dc6e93cb..8df1427fa5 100644 --- a/packages/backend-core/src/tenancy/tests/tenancy.spec.ts +++ b/packages/backend-core/src/tenancy/tests/tenancy.spec.ts @@ -1,15 +1,10 @@ -// mock the `getTenantId` and `isMultiTenant` functions -jest.mock("../../context", () => ({ - getTenantId: jest.fn(() => "budibase"), - isMultiTenant: jest.fn(() => true), -})) - import { TenantResolutionStrategy } from "@budibase/types" import { addTenantToUrl, isUserInAppTenant, getTenantIDFromCtx } from "../" import { isMultiTenant, getTenantIDFromAppID, DEFAULT_TENANT_ID, + getTenantId, } from "../../context" import { any } from "joi" const mockedIsMultiTenant = isMultiTenant as jest.MockedFunction< @@ -18,6 +13,11 @@ const mockedIsMultiTenant = isMultiTenant as jest.MockedFunction< const mockedGetTenantIDFromAppID = getTenantIDFromAppID as jest.MockedFunction< typeof getTenantIDFromAppID > +// mock the `getTenantId` and `isMultiTenant` functions +jest.mock("../../context", () => ({ + getTenantId: jest.fn(() => "budibase"), + isMultiTenant: jest.fn(() => true), +})) describe("addTenantToUrl", () => { it("should append tenantId parameter to the URL", () => { const url = "https://budibase.com"