Fix timespan issues
This commit is contained in:
parent
8f186041ac
commit
74269dbb27
1 changed files with 7 additions and 2 deletions
|
@ -10,8 +10,9 @@ import * as structures from "../../tests/utilities/structures"
|
||||||
import { MIGRATIONS } from "../"
|
import { MIGRATIONS } from "../"
|
||||||
import * as helpers from "./helpers"
|
import * as helpers from "./helpers"
|
||||||
|
|
||||||
const { mocks } = require("@budibase/backend-core/tests")
|
import tk from "timekeeper"
|
||||||
const timestamp = mocks.date.MOCK_DATE.toISOString()
|
const timestamp = new Date().toISOString()
|
||||||
|
tk.freeze(timestamp)
|
||||||
|
|
||||||
const clearMigrations = async () => {
|
const clearMigrations = async () => {
|
||||||
const dbs = [context.getDevAppDB(), context.getProdAppDB()]
|
const dbs = [context.getDevAppDB(), context.getProdAppDB()]
|
||||||
|
@ -24,6 +25,10 @@ const clearMigrations = async () => {
|
||||||
|
|
||||||
jest.setTimeout(10000)
|
jest.setTimeout(10000)
|
||||||
|
|
||||||
|
afterAll(() => {
|
||||||
|
tk.reset()
|
||||||
|
})
|
||||||
|
|
||||||
describe("migrations", () => {
|
describe("migrations", () => {
|
||||||
const config = new TestConfig()
|
const config = new TestConfig()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue