fix(ci): normalize windows test output

This commit is contained in:
Peter Steinberger
2026-01-08 03:42:09 +00:00
parent 88a8767fa8
commit ad6095c807
2 changed files with 5 additions and 3 deletions

View File

@@ -171,7 +171,7 @@ describe("bash tool backgrounding", () => {
limit: 2, limit: 2,
}); });
const textBlock = log.content.find((c) => c.type === "text"); 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((log.details as { totalLines?: number }).totalLines).toBe(3);
expect(status).toBe("completed"); expect(status).toBe("completed");
}); });
@@ -191,7 +191,7 @@ describe("bash tool backgrounding", () => {
limit: 1, limit: 1,
}); });
const textBlock = log.content.find((c) => c.type === "text"); 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 () => { it("scopes process sessions by scopeKey", async () => {

View File

@@ -513,8 +513,10 @@ describe("doctor", () => {
.spyOn(os, "homedir") .spyOn(os, "homedir")
.mockReturnValue("/Users/steipete"); .mockReturnValue("/Users/steipete");
const realExists = fs.existsSync; const realExists = fs.existsSync;
const legacyPath = path.join("/Users/steipete", "clawdis");
const existsSpy = vi.spyOn(fs, "existsSync").mockImplementation((value) => { 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); return realExists(value as never);
}); });