





















@@ -24,6 +24,14 @@ function countNonEmptyLines(value: string): number {
2424return count;
2525}
262627+function requireFirstMockCall<T>(mock: { mock: { calls: T[][] } }, label: string): T[] {
28+const call = mock.mock.calls.at(0);
29+if (!call) {
30+throw new Error(`expected ${label} call`);
31+}
32+return call;
33+}
34+2735describe("doctor session transcript repair", () => {
2836let root: string;
2937@@ -133,7 +141,7 @@ describe("doctor session transcript repair", () => {
133141await noteSessionTranscriptHealth({ shouldRepair: false, sessionDirs: [sessionsDir] });
134142135143expect(note).toHaveBeenCalledTimes(1);
136-const [message, title] = note.mock.calls[0] as [string, string];
144+const [message, title] = requireFirstMockCall(note, "doctor note") as [string, string];
137145expect(title).toBe("Session transcripts");
138146expect(message).toContain("duplicated prompt-rewrite branches");
139147expect(message).toContain('Run "openclaw doctor --fix"');
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。