From 96fe7fe3dd81a0efd72467bc88bb31df7cc3a113 Mon Sep 17 00:00:00 2001 From: Zvi Grinberg Date: Thu, 7 Sep 2023 10:54:38 +0300 Subject: [PATCH] test: use a more portable format for fake timestamp for npm tests Signed-off-by: Zvi Grinberg --- src/index.js | 1 - test/providers/javascript_npm.test.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 55d7a0e..4177a19 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,4 @@ import {rootPath} from "get-root-path"; -import {EOL} from "os"; import { availableProviders, match } from './provider.js' import {AnalysisReport} from '../generated/backend/AnalysisReport.js' import analysis from './analysis.js' diff --git a/test/providers/javascript_npm.test.js b/test/providers/javascript_npm.test.js index bf918e8..f5ef5fa 100644 --- a/test/providers/javascript_npm.test.js +++ b/test/providers/javascript_npm.test.js @@ -73,4 +73,4 @@ suite('testing the javascript-npm data provider', () => { }) -}).beforeAll(() => clock = sinon.useFakeTimers(new Date(2023,7,7))).afterAll(()=> clock.restore()); +}).beforeAll(() => clock = sinon.useFakeTimers(new Date('2023-08-07T00:00:00.000Z'))).afterAll(()=> clock.restore());