From cdc55a0c3200e08203440380d7a6a1d61f96d0c2 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 3 Feb 2023 09:15:40 +0000 Subject: [PATCH] use correct postgres mock --- .../server/src/api/routes/tests/environmentVariables.spec.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/server/src/api/routes/tests/environmentVariables.spec.ts b/packages/server/src/api/routes/tests/environmentVariables.spec.ts index 53228ee9f7..b09d6d2365 100644 --- a/packages/server/src/api/routes/tests/environmentVariables.spec.ts +++ b/packages/server/src/api/routes/tests/environmentVariables.spec.ts @@ -1,6 +1,5 @@ -jest.mock("../../../integrations/postgres") +jest.mock("pg") import * as setup from "./utilities" -import postgres from "../../../integrations/postgres" import { mocks } from "@budibase/backend-core/tests" import { env, events } from "@budibase/backend-core" const structures = setup.structures @@ -127,7 +126,6 @@ describe("/api/env/variables", () => { a: "string", b: "number", }) - expect(res.body.rows.length).toEqual(1) expect(events.query.previewed).toBeCalledTimes(1) expect(events.query.previewed).toBeCalledWith(