test: fix timezone issues in EventDisplay tests
- Set explicit UTC timezone globally in jest.config.ts and setupTests.ts - Mock Intl.DateTimeFormat to use UTC by default while preserving prototype - Replace regex patterns with exact values for declarative assertions - Remove complex date formatting computations in tests - Use fixed dates (2025-01-15T10:00:00.000Z) for consistent test results - Fix EventDisplay.test.tsx to use exact time values instead of regex
This commit is contained in:
committed by
Benoit TELLIER
parent
59e7992cfe
commit
192ab17789
@@ -1,5 +1,8 @@
|
||||
import type { Config } from "jest";
|
||||
|
||||
// Set timezone to UTC for consistent test results across all environments
|
||||
process.env.TZ = "UTC";
|
||||
|
||||
const config: Config = {
|
||||
collectCoverage: true,
|
||||
coverageDirectory: "coverage",
|
||||
|
||||
Reference in New Issue
Block a user