Merge pull request #4943 from Tong-bit-art/fix/doctor-driver-module-reset

test(doctor): reset modules before applying the driver mock
This commit is contained in:
rUv authored and GitHub committed 2026-11-10 13:02:19 -05:00
commit 384b1ff5d9
1 file changed
+4
@@ -13,6 +13,10 @@ let workdir: string;
let dbPath: string;
async function runDoctor() {
// Full-suite isolation (#4643): this worker may already have imported
// doctor.ts before the current test registered its vi.doMock. Re-import a
// fresh module so the mock applies to its Memory Integrity check.
vi.resetModules();
const { doctorCommand } = await import('../src/commands/doctor.js');
const result = await doctorCommand.action!({
flags: { component: 'memory' }, args: [], config: {},