1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00

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")
})
})