Mocking Date.now()
in a jest unit test.
jest
.spyOn(global.Date, 'now')
.mockImplementationOnce(() =>
new Date('2010-10-10T10:10:10.100Z').valueOf()
);
Mocking Date.now()
in a jest unit test.
jest
.spyOn(global.Date, 'now')
.mockImplementationOnce(() =>
new Date('2010-10-10T10:10:10.100Z').valueOf()
);
For further actions, you may consider blocking this person and/or reporting abuse
arinak1017 -
Mohammad Saquib -
Ayush Kumar Vishwakarma -
John smithappdev -
Top comments (0)