We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7031f5 commit dc24136Copy full SHA for dc24136
1 file changed
utils/time.test.ts
@@ -282,4 +282,10 @@ describe('getSecondsUntilMidnightInTimezone — extreme timezone offset boundary
282
283
expect(getSecondsUntilMidnightInTimezone('Pacific/Midway')).toBe(86400);
284
});
285
+
286
+ it('throws a RangeError for invalid timezone identifiers', () => {
287
+ vi.setSystemTime(new Date('2024-06-15T12:00:00.000Z'));
288
289
+ expect(() => getSecondsUntilMidnightInTimezone('Invalid/Timezone')).toThrow(RangeError);
290
+ });
291
0 commit comments