test(doctor): preserve facade loader mock exports

This commit is contained in:
Vincent Koc
2026-05-04 22:08:43 -07:00
parent 557c5bf705
commit a52010be7d

View File

@@ -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<typeof import("../plugin-sdk/facade-loader.js")>(
"../plugin-sdk/facade-loader.js",
);
return {
...actual,
loadBundledPluginPublicSurfaceModuleSync,
};
});
doctorCommand = await loadDoctorCommandForTest({
unmockModules: [
"../flows/doctor-health-contributions.js",