jest.tz.config.cjs949 BView on GitHub /**
* The timezone pass.
*
* Every CI runner is UTC, and a date bug that mixes a UTC calendar reading with a LOCAL one
* agrees with itself in UTC — it only shows up somewhere else. `formatRelativeDate` shipped
* exactly that and the whole suite stayed green, so "UTC" is not a neutral default here, it
* is a blind spot.
*
* TZ has to be set before the process starts (V8 caches the zone on first use, so neither a
* `process.env.TZ` assignment inside a test nor a custom testEnvironment can move it), which
* is why this is a second invocation rather than a project inside the main config.
*
* Add a test here when its expected output depends on the viewer's calendar day.
*/
const base = require('./jest.config.cjs');
module.exports = {
...base,
roots: ['<rootDir>/tests/timezone'],
testMatch: ['**/tests/timezone/**/*.test.ts', '**/tests/timezone/**/*.test.tsx'],
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
};