diff --git a/src/agents/bash-tools.test.ts b/src/agents/bash-tools.test.ts index 99d8c5ebf..d4295d0f1 100644 --- a/src/agents/bash-tools.test.ts +++ b/src/agents/bash-tools.test.ts @@ -171,7 +171,7 @@ describe("bash tool backgrounding", () => { limit: 2, }); const textBlock = log.content.find((c) => c.type === "text"); - expect(textBlock?.text).toBe("two\nthree"); + expect(textBlock?.text?.trim()).toBe("two\nthree"); expect((log.details as { totalLines?: number }).totalLines).toBe(3); expect(status).toBe("completed"); }); @@ -191,7 +191,7 @@ describe("bash tool backgrounding", () => { limit: 1, }); const textBlock = log.content.find((c) => c.type === "text"); - expect(textBlock?.text).toBe("beta"); + expect(textBlock?.text?.trim()).toBe("beta"); }); it("scopes process sessions by scopeKey", async () => { diff --git a/src/commands/doctor.test.ts b/src/commands/doctor.test.ts index 7cde1af1e..0da6ab30b 100644 --- a/src/commands/doctor.test.ts +++ b/src/commands/doctor.test.ts @@ -513,8 +513,10 @@ describe("doctor", () => { .spyOn(os, "homedir") .mockReturnValue("/Users/steipete"); const realExists = fs.existsSync; + const legacyPath = path.join("/Users/steipete", "clawdis"); const existsSpy = vi.spyOn(fs, "existsSync").mockImplementation((value) => { - if (value === "/Users/steipete/clawdis") return true; + if (value === "/Users/steipete/clawdis" || value === legacyPath) + return true; return realExists(value as never); });