Skip to content

Commit

Permalink
Fix initial conditions for test
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-marcellini committed Sep 24, 2024
1 parent 473f500 commit 28c6a59
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/unit/DateUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ describe('DateUtils', () => {
it('canUpdateTimezone should return false when lastUpdatedTimezoneTime is less than 5 minutes ago', () => {
// Use fake timers to control the current time
jest.useFakeTimers();
DateUtils.setTimezoneUpdated();
jest.setSystemTime(addMinutes(new Date(), 4));
const isUpdateTimezoneAllowed = DateUtils.canUpdateTimezone();
expect(isUpdateTimezoneAllowed).toBe(false);
Expand Down

0 comments on commit 28c6a59

Please sign in to comment.