Skip to content

Commit 7ea9b7e

Browse files
committed
Fix test.
1 parent 8804646 commit 7ea9b7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/__tests__/createGetCurrentTimestamp.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ describe('getCurrentTimestamp', () => {
2323
});
2424

2525
test('returns a timestamp', () => {
26-
const date = new Date(2000, 1, 1, 13);
26+
const date = new Date(Date.UTC(2000, 1, 1, 13));
2727
vi.setSystemTime(date);
2828

2929
const getCurrentTimestamp = createGetCurrentTimestamp();
3030

31-
expect(getCurrentTimestamp()).toBe(949435200000);
31+
expect(getCurrentTimestamp()).toBe(949410000000);
3232
});
3333

3434
test('returns an unique timestamp if the same timestamp is returned multiple times', () => {
35-
const date = new Date(2000, 1, 1, 13);
35+
const date = new Date(Date.UTC(2000, 1, 1, 13));
3636
vi.setSystemTime(date);
3737

3838
const getCurrentTimestamp = createGetCurrentTimestamp();
3939

40-
expect(getCurrentTimestamp()).toBe(949435200000);
41-
expect(getCurrentTimestamp()).toBe(949435200001);
40+
expect(getCurrentTimestamp()).toBe(949410000000);
41+
expect(getCurrentTimestamp()).toBe(949410000001);
4242
});
4343
});

0 commit comments

Comments
 (0)