Skip to content

Commit 7afa3d6

Browse files
anandgupta42claude
andauthored
fix: 52 CI test failures caused by mock.module leaking across test files (#460)
Root cause: `check-e2e.test.ts` used `mock.module("@/altimate/native")` and `mock.module("@/util/glob")` to mock Dispatcher and Glob. Bun's `mock.module` leaks across test files in multi-file runs, replacing the real modules for ALL subsequent tests — breaking Glob.match/scanSync and Dispatcher.call globally. Fix: - Replace `mock.module("@/altimate/native")` with `Dispatcher.register()` / `Dispatcher.reset()` — the Dispatcher's own test isolation API. No module replacement, no leak. - Remove `mock.module("@/util/glob")` entirely — not needed since the tests use real file paths. - Restore `glob.ts` to original (no changes needed — the npm imports work fine when not polluted by mock.module). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 16c38bb commit 7afa3d6

File tree

1 file changed

+78
-77
lines changed

1 file changed

+78
-77
lines changed

0 commit comments

Comments
 (0)