From 28c6a591f95ddaca598c98bfe299e70a0eca00a2 Mon Sep 17 00:00:00 2001 From: neil-marcellini Date: Tue, 24 Sep 2024 11:43:13 -0700 Subject: [PATCH] Fix initial conditions for test --- tests/unit/DateUtilsTest.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/DateUtilsTest.ts b/tests/unit/DateUtilsTest.ts index f3abed2e3372..52ef39ed4da5 100644 --- a/tests/unit/DateUtilsTest.ts +++ b/tests/unit/DateUtilsTest.ts @@ -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);