Test updates

This commit is contained in:
Rory Powell 2022-04-12 16:03:20 +01:00
parent a6107dc7f9
commit fd6a223ad8
1 changed files with 2 additions and 5 deletions

View File

@ -2,7 +2,6 @@ const { outputProcessing } = require("../../../utilities/rowProcessor")
const setup = require("./utilities") const setup = require("./utilities")
const { basicRow } = setup.structures const { basicRow } = setup.structures
const { doInAppContext } = require("@budibase/backend-core/context") const { doInAppContext } = require("@budibase/backend-core/context")
const { testUtils } = require("@budibase/backend-core")
describe("/rows", () => { describe("/rows", () => {
let request = setup.getRequest() let request = setup.getRequest()
@ -67,15 +66,13 @@ describe("/rows", () => {
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
.expect(200) .expect(200)
// can't mock dates due to coercion test requiring real Date clas
delete res.body.createdAt
delete res.body.updatedAt
expect(res.body).toEqual({ expect(res.body).toEqual({
...row, ...row,
_id: existing._id, _id: existing._id,
_rev: existing._rev, _rev: existing._rev,
type: "row", type: "row",
createdAt: "2020-01-01T00:00:00.000Z",
updatedAt: "2020-01-01T00:00:00.000Z",
}) })
}) })