Skip to content

Commit 32a46c1

Browse files
committed
update test
1 parent 4e7a3a6 commit 32a46c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

__tests__/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ describe("time utilities", () => {
2323

2424
test("nowFormatted", async () => {
2525
jest.useFakeTimers();
26-
jest.setSystemTime(new Date(Date.UTC(2021, 1, 1)));
26+
jest.setSystemTime(new Date(Date.UTC(2021, 1, 1)).getTime());
2727

2828
expect(util.time.nowFormatted('YYYY-MM-dd HH:mm:ss')).toEqual("2021-02-01T00:00:00.000Z");
2929
});
3030
test("nowISO8601", async () => {
3131
jest.useFakeTimers();
32-
jest.setSystemTime(new Date(Date.UTC(2021, 1, 1)));
32+
jest.setSystemTime(new Date(Date.UTC(2021, 1, 1)).getTime());
3333

3434
expect(util.time.nowISO8601()).toEqual("2021-02-01T00:00:00.000Z");
3535
});

0 commit comments

Comments
 (0)