Skip to content

Commit

Permalink
test TZ config
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Sep 1, 2024
1 parent 1fb70dc commit 34475e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('BuildDiagnostics', () => {
// ASSERT
expect(screen.getByTestId('build')).toBeDefined();
expect(screen.getByTestId('build-env')).toHaveTextContent('test');
expect(screen.getByTestId('build-time')).toHaveTextContent('1969-12-31 19:00:00 -05:00');
expect(screen.getByTestId('build-time')).toHaveTextContent('1970-01-01 00:00:00 +00:00');
expect(screen.getByTestId('build-sha')).toHaveTextContent('test');
expect(screen.getByTestId('build-workflow')).toHaveTextContent('test 1.1');
});
Expand Down
3 changes: 3 additions & 0 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import { afterAll, afterEach, beforeAll } from 'vitest';
import { server } from 'test/mocks/server';
import { queryClient } from 'test/query-client';

// Tests always run in this timezone
process.env.TZ = 'UTC';

// Mock matchmedia
window.matchMedia =
window.matchMedia ||
Expand Down

0 comments on commit 34475e6

Please sign in to comment.