Skip to content

Commit 43429da

Browse files
committed
try setupFiles
1 parent 5d237ef commit 43429da

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

frontend/jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const config: Config = {
4242
},
4343

4444
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
45+
setupFiles: ['<rootDir>/jest.tz-setup.ts'],
4546
};
4647

4748
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async

frontend/jest.setup.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@ createMocks();
3535
if (typeof window !== 'undefined') {
3636
window.HTMLElement.prototype.scrollIntoView = jest.fn();
3737
}
38-
39-
// Pin timezone for deterministic date rendering
40-
process.env.TZ = 'Europe/London';

frontend/jest.tz-setup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// pin TZ for deterministic date rendering
2+
process.env.TZ = 'Europe/London';

0 commit comments

Comments
 (0)