Skip to content

Commit

Permalink
fix(web): time zone dependent test (immich-app#13859)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasm91 authored and bdavis2-PCTY committed Nov 18, 2024
1 parent d0b0d8f commit 3cd3b7f
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 3cd3b7f

Please sign in to comment.