test: dedupe doctor memory mock reads · openclaw/openclaw@367c600
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -142,7 +142,7 @@ function resetMemoryRecallMocks() {
|
142 | 142 | } |
143 | 143 | |
144 | 144 | function firstNoteMessage(): string { |
145 | | -return String(note.mock.calls.at(0)?.[0] ?? ""); |
| 145 | +return String(note.mock.calls[0]?.[0] ?? ""); |
146 | 146 | } |
147 | 147 | |
148 | 148 | describe("noteMemorySearchHealth", () => { |
@@ -852,7 +852,7 @@ describe("memory recall doctor integration", () => {
|
852 | 852 | expect(repairDreamingArtifacts).toHaveBeenCalledWith({ |
853 | 853 | workspaceDir: "/tmp/agent-default/workspace", |
854 | 854 | }); |
855 | | -const message = String(note.mock.calls.at(-1)?.[0] ?? ""); |
| 855 | +const message = String(note.mock.calls[note.mock.calls.length - 1]?.[0] ?? ""); |
856 | 856 | expect(message).toContain("Dreaming artifacts repaired:"); |
857 | 857 | expect(message).toContain("archived session corpus"); |
858 | 858 | expect(message).toContain("archived session-ingestion state"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。