use correct postgres mock
This commit is contained in:
parent
126b475c32
commit
cdc55a0c32
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue