From a52010be7d2da09a8800b7e06316cfb6cb1615b5 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 4 May 2026 22:08:43 -0700 Subject: [PATCH] test(doctor): preserve facade loader mock exports --- ...ctor.warns-state-directory-is-missing.e2e.test.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts b/src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts index a48cc53149d..5470afc436d 100644 --- a/src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts +++ b/src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts @@ -110,9 +110,15 @@ describe("doctor command", () => { const loadBundledPluginPublicSurfaceModuleSync = vi.fn(() => { throw new Error("missing browser doctor facade"); }); - vi.doMock("../plugin-sdk/facade-loader.js", () => ({ - loadBundledPluginPublicSurfaceModuleSync, - })); + vi.doMock("../plugin-sdk/facade-loader.js", async () => { + const actual = await vi.importActual( + "../plugin-sdk/facade-loader.js", + ); + return { + ...actual, + loadBundledPluginPublicSurfaceModuleSync, + }; + }); doctorCommand = await loadDoctorCommandForTest({ unmockModules: [ "../flows/doctor-health-contributions.js",