use correct postgres mock

This commit is contained in:
Peter Clement 2023-02-03 09:15:40 +00:00
parent 126b475c32
commit cdc55a0c32
1 changed files with 1 additions and 3 deletions

View File

@ -1,6 +1,5 @@
jest.mock("../../../integrations/postgres") jest.mock("pg")
import * as setup from "./utilities" import * as setup from "./utilities"
import postgres from "../../../integrations/postgres"
import { mocks } from "@budibase/backend-core/tests" import { mocks } from "@budibase/backend-core/tests"
import { env, events } from "@budibase/backend-core" import { env, events } from "@budibase/backend-core"
const structures = setup.structures const structures = setup.structures
@ -127,7 +126,6 @@ describe("/api/env/variables", () => {
a: "string", a: "string",
b: "number", b: "number",
}) })
expect(res.body.rows.length).toEqual(1) expect(res.body.rows.length).toEqual(1)
expect(events.query.previewed).toBeCalledTimes(1) expect(events.query.previewed).toBeCalledTimes(1)
expect(events.query.previewed).toBeCalledWith( expect(events.query.previewed).toBeCalledWith(