diff --git a/modules/worker/front/time-control/index.spec.js b/modules/worker/front/time-control/index.spec.js index 39a47c47f9..4f317a5e69 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()); }); }); });