Fix date related tests
This commit is contained in:
parent
6a4fe1d5e6
commit
8c1e539fc7
|
@ -1,3 +1,6 @@
|
|||
const tk = require( "timekeeper")
|
||||
tk.freeze(Date.now())
|
||||
|
||||
// Mock out postgres for this
|
||||
jest.mock("pg")
|
||||
jest.mock("node-fetch")
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
const tk = require( "timekeeper")
|
||||
const timestamp = new Date("2023-01-26T11:48:57.597Z").toISOString()
|
||||
tk.freeze(timestamp)
|
||||
|
||||
|
||||
const { outputProcessing } = require("../../../utilities/rowProcessor")
|
||||
const setup = require("./utilities")
|
||||
const { basicRow } = setup.structures
|
||||
|
@ -111,8 +116,8 @@ describe("/rows", () => {
|
|||
_id: existing._id,
|
||||
_rev: existing._rev,
|
||||
type: "row",
|
||||
createdAt: "2020-01-01T00:00:00.000Z",
|
||||
updatedAt: "2020-01-01T00:00:00.000Z",
|
||||
createdAt: timestamp,
|
||||
updatedAt: timestamp,
|
||||
})
|
||||
await assertQueryUsage(queryUsage + 1)
|
||||
})
|
||||
|
|
|
@ -25,10 +25,6 @@ const clearMigrations = async () => {
|
|||
|
||||
jest.setTimeout(10000)
|
||||
|
||||
afterAll(() => {
|
||||
tk.reset()
|
||||
})
|
||||
|
||||
describe("migrations", () => {
|
||||
const config = new TestConfig()
|
||||
|
||||
|
|
Loading…
Reference in New Issue