diff --git a/src/commands/doctor.test.ts b/src/commands/doctor.test.ts index 0ed3ce7eb..ad67cc85c 100644 --- a/src/commands/doctor.test.ts +++ b/src/commands/doctor.test.ts @@ -636,16 +636,15 @@ describe("doctor", () => { expect( note.mock.calls.some(([message, title]) => { - if (title !== "Sandbox") return false; - if (typeof message !== "string") return false; - const normalized = message.replace(/\s+/g, " "); + if (title !== "Sandbox" || typeof message !== "string") return false; + const normalized = message.replace(/\s+/g, " ").trim(); return ( normalized.includes('agents.list (id "work") sandbox docker') && normalized.includes('scope resolves to "shared"') ); }), ).toBe(true); - }); + }, 10_000); it("warns when legacy workspace directories exist", async () => { readConfigFileSnapshot.mockResolvedValue({ diff --git a/src/terminal/note.ts b/src/terminal/note.ts index 7a35cf069..91b1c42c4 100644 --- a/src/terminal/note.ts +++ b/src/terminal/note.ts @@ -1,7 +1,6 @@ import { note as clackNote } from "@clack/prompts"; import { visibleWidth } from "./ansi.js"; import { stylePromptTitle } from "./prompt-style.js"; - function splitLongWord(word: string, maxLen: number): string[] { if (maxLen <= 0) return [word]; const chars = Array.from(word);