diff --git a/src/commands/doctor-config-flow.include-warning.test.ts b/src/commands/doctor-config-flow.include-warning.test.ts index bea208f4022..d076a3c38a3 100644 --- a/src/commands/doctor-config-flow.include-warning.test.ts +++ b/src/commands/doctor-config-flow.include-warning.test.ts @@ -1,22 +1,22 @@ import { describe, expect, it, vi } from "vitest"; -import { withTempHomeConfig } from "../config/test-helpers.js"; import { note } from "../terminal/note.js"; +import { noteIncludeConfinementWarning } from "./doctor-config-analysis.js"; vi.mock("../terminal/note.js", () => ({ note: vi.fn(), })); -import { loadAndMaybeMigrateDoctorConfig } from "./doctor-config-flow.js"; - const noteSpy = vi.mocked(note); describe("doctor include warning", () => { - it("surfaces include confinement hint for escaped include paths", async () => { - await withTempHomeConfig({ $include: "/etc/passwd" }, async () => { - await loadAndMaybeMigrateDoctorConfig({ - options: { nonInteractive: true }, - confirm: async () => false, - }); + it("surfaces include confinement hint for escaped include paths", () => { + noteIncludeConfinementWarning({ + path: "/tmp/openclaw-config/openclaw.json", + issues: [ + { + message: "Include path escapes config directory: /etc/passwd", + }, + ], }); expect(noteSpy).toHaveBeenCalledWith(