diff --git a/packages/server/src/migrations/tests/index.spec.ts b/packages/server/src/migrations/tests/index.spec.ts index cf283cf518..4540d8f61f 100644 --- a/packages/server/src/migrations/tests/index.spec.ts +++ b/packages/server/src/migrations/tests/index.spec.ts @@ -10,8 +10,9 @@ import * as structures from "../../tests/utilities/structures" import { MIGRATIONS } from "../" import * as helpers from "./helpers" -const { mocks } = require("@budibase/backend-core/tests") -const timestamp = mocks.date.MOCK_DATE.toISOString() +import tk from "timekeeper" +const timestamp = new Date().toISOString() +tk.freeze(timestamp) const clearMigrations = async () => { const dbs = [context.getDevAppDB(), context.getProdAppDB()] @@ -24,6 +25,10 @@ const clearMigrations = async () => { jest.setTimeout(10000) +afterAll(() => { + tk.reset() +}) + describe("migrations", () => { const config = new TestConfig()