test: dedupe agent runner memory mock reads · openclaw/openclaw@712ceab
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -623,9 +623,7 @@ describe("runMemoryFlushIfNeeded", () => {
|
623 | 623 | replyOperation: createReplyOperation(), |
624 | 624 | }); |
625 | 625 | |
626 | | -const compactCall = compactEmbeddedPiSessionMock.mock.calls.at(0)?.[0] as { |
627 | | -currentTokenCount?: number; |
628 | | -}; |
| 626 | +const compactCall = requireCompactEmbeddedPiSessionCall(); |
629 | 627 | expect(compactCall.currentTokenCount).toBeGreaterThanOrEqual(100_000); |
630 | 628 | }); |
631 | 629 | |
@@ -732,9 +730,7 @@ describe("runMemoryFlushIfNeeded", () => {
|
732 | 730 | replyOperation: createReplyOperation(), |
733 | 731 | }); |
734 | 732 | |
735 | | -const compactCall = compactEmbeddedPiSessionMock.mock.calls.at(0)?.[0] as { |
736 | | -currentTokenCount?: number; |
737 | | -}; |
| 733 | +const compactCall = requireCompactEmbeddedPiSessionCall(); |
738 | 734 | expect(compactCall.currentTokenCount).toBeGreaterThan(100_000); |
739 | 735 | }); |
740 | 736 | |
@@ -791,9 +787,7 @@ describe("runMemoryFlushIfNeeded", () => {
|
791 | 787 | replyOperation: createReplyOperation(), |
792 | 788 | }); |
793 | 789 | |
794 | | -const compactCall = compactEmbeddedPiSessionMock.mock.calls.at(0)?.[0] as { |
795 | | -currentTokenCount?: number; |
796 | | -}; |
| 790 | +const compactCall = requireCompactEmbeddedPiSessionCall(); |
797 | 791 | expect(compactCall.currentTokenCount).toBeGreaterThanOrEqual(96_000); |
798 | 792 | }); |
799 | 793 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。