From 594f258232435b841c11b956aaec32aa1d66a987 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 30 Nov 2021 07:16:43 +0100 Subject: [PATCH] modify js date format --- modules/worker/front/time-control/index.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/worker/front/time-control/index.spec.js b/modules/worker/front/time-control/index.spec.js index 39a47c47f..4f317a5e6 100644 --- a/modules/worker/front/time-control/index.spec.js +++ b/modules/worker/front/time-control/index.spec.js @@ -140,8 +140,8 @@ describe('Component vnWorkerTimeControl', () => { }); it(`should set the controller date using the received timestamp`, () => { - const date = 'Wed, 31 Dec 1969 23:00:00 GMT'; const timestamp = 1; + const date = new Date(timestamp); controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())}; controller.$.calendar = {}; @@ -149,7 +149,7 @@ describe('Component vnWorkerTimeControl', () => { controller.$postLink(); - expect(controller.date.toUTCString()).toEqual(date); + expect(controller.date.toDateString()).toEqual(date.toDateString()); }); }); });