Skip to content

Commit

Permalink
fix(web): time zone dependent test (#13859)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasm91 authored Nov 7, 2024
1 parent b238b69 commit 0b98c5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/src/lib/utils/timeline-util.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import { DateTime } from 'luxon';
describe('formatGroupTitle', () => {
beforeAll(() => {
vi.useFakeTimers();
process.env.TZ = 'UTC';
vi.setSystemTime(new Date('2024-07-27T12:00:00Z'));
});

afterAll(() => {
vi.useRealTimers();
delete process.env.TZ;
});

it('formats today', () => {
Expand Down

0 comments on commit 0b98c5e

Please sign in to comment.