modify js date format
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
85e3b47408
commit
594f258232
|
@ -140,8 +140,8 @@ describe('Component vnWorkerTimeControl', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should set the controller date using the received timestamp`, () => {
|
it(`should set the controller date using the received timestamp`, () => {
|
||||||
const date = 'Wed, 31 Dec 1969 23:00:00 GMT';
|
|
||||||
const timestamp = 1;
|
const timestamp = 1;
|
||||||
|
const date = new Date(timestamp);
|
||||||
|
|
||||||
controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())};
|
controller.$.model = {applyFilter: jest.fn().mockReturnValue(Promise.resolve())};
|
||||||
controller.$.calendar = {};
|
controller.$.calendar = {};
|
||||||
|
@ -149,7 +149,7 @@ describe('Component vnWorkerTimeControl', () => {
|
||||||
|
|
||||||
controller.$postLink();
|
controller.$postLink();
|
||||||
|
|
||||||
expect(controller.date.toUTCString()).toEqual(date);
|
expect(controller.date.toDateString()).toEqual(date.toDateString());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue