From 6bf203cf4fc282ff7408560cb3eeb8217a8028fe Mon Sep 17 00:00:00 2001 From: joseph-sentry Date: Fri, 14 Jun 2024 14:09:02 -0400 Subject: [PATCH] fix: remove truncation of timestamp Signed-off-by: joseph-sentry --- __tests__/__snapshots__/buildJsonResults.test.js.snap | 4 ++-- __tests__/buildJsonResults.test.js | 2 +- utils/buildJsonResults.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/__snapshots__/buildJsonResults.test.js.snap b/__tests__/__snapshots__/buildJsonResults.test.js.snap index 95937c4..56b262c 100644 --- a/__tests__/__snapshots__/buildJsonResults.test.js.snap +++ b/__tests__/__snapshots__/buildJsonResults.test.js.snap @@ -22,7 +22,7 @@ Object { "skipped": 0, "tests": 1, "time": 0.163, - "timestamp": "2018-02-10T14:52:31", + "timestamp": "2018-02-10T14:52:31.100Z", }, }, Object { @@ -60,7 +60,7 @@ Object { "skipped": 0, "tests": 1, "time": 0.073, - "timestamp": "2018-02-10T14:52:31", + "timestamp": "2018-02-10T14:52:31.274Z", }, }, Object { diff --git a/__tests__/buildJsonResults.test.js b/__tests__/buildJsonResults.test.js index f7a91c3..66dce8c 100644 --- a/__tests__/buildJsonResults.test.js +++ b/__tests__/buildJsonResults.test.js @@ -475,7 +475,7 @@ describe('buildJsonResults', () => { "skipped": 0, "tests": 1, "time": 0.12, - "timestamp": "2017-03-17T01:05:47", + "timestamp": "2017-03-17T01:05:47.524Z", }, }, Object { diff --git a/utils/buildJsonResults.js b/utils/buildJsonResults.js index 46d2378..ecf01bc 100644 --- a/utils/buildJsonResults.js +++ b/utils/buildJsonResults.js @@ -227,7 +227,7 @@ module.exports = function (report, appDirectory, options, rootDir = null) { errors: suiteErrors, failures: suite.numFailingTests, skipped: suite.numPendingTests, - timestamp: (new Date(suite.perfStats.start)).toISOString().slice(0, -5), + timestamp: (new Date(suite.perfStats.start)).toISOString(), time: suiteExecutionTime, tests: suiteNumTests }