Changing over to using timestamps.

This commit is contained in:
mike12345567 2021-09-14 16:54:42 +01:00
parent 2f9f643592
commit df1555185d
2 changed files with 2 additions and 1 deletions

View File

@ -205,7 +205,7 @@ exports.test = async function (ctx) {
// save a test history run
await updateTestHistory(ctx.appId, automation, {
...ctx.request.body,
occurredAt: new Date().toISOString(),
occurredAt: new Date().getTime(),
})
await clearTestFlag(automation._id)
ctx.body = response

View File

@ -46,6 +46,7 @@ describe("/metadata", () => {
const metadata = await getMetadata(MetadataTypes.AUTOMATION_TEST_HISTORY)
expect(metadata).toBeDefined()
expect(metadata.history.length).toBe(1)
expect(typeof metadata.history[0].occurredAt).toBe("number")
})
})