test(doctor): complete browser health mock

This commit is contained in:
Vincent Koc
2026-05-30 02:42:33 +02:00
parent ee0cf9e5bb
commit b5c163dffa

View File

@@ -6,12 +6,14 @@ import type { HealthRepairContext } from "./health-checks.js";
const browserMocks = vi.hoisted(() => ({
detectLegacyClawdBrowserProfileResidue: vi.fn(),
maybeArchiveLegacyClawdBrowserProfileResidue: vi.fn(),
noteChromeMcpBrowserReadiness: vi.fn(),
}));
vi.mock("../commands/doctor-browser.js", () => ({
detectLegacyClawdBrowserProfileResidue: browserMocks.detectLegacyClawdBrowserProfileResidue,
maybeArchiveLegacyClawdBrowserProfileResidue:
browserMocks.maybeArchiveLegacyClawdBrowserProfileResidue,
noteChromeMcpBrowserReadiness: browserMocks.noteChromeMcpBrowserReadiness,
}));
const residue = {
@@ -38,6 +40,7 @@ describe("browser clawd profile residue health check", () => {
beforeEach(() => {
browserMocks.detectLegacyClawdBrowserProfileResidue.mockReset();
browserMocks.maybeArchiveLegacyClawdBrowserProfileResidue.mockReset();
browserMocks.noteChromeMcpBrowserReadiness.mockReset();
});
it("reports legacy clawd profile residue through doctor lint", async () => {