test: clear remaining agent assertion scans · openclaw/openclaw@607f0b4
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
File tree
src/agents/pi-embedded-runner
| Original file line number | Diff line number | Diff line change |
|---|
@@ -631,7 +631,7 @@ describe("runEmbeddedAttempt context engine sessionKey forwarding", () => {
|
631 | 631 | .trim() |
632 | 632 | .split("\n") |
633 | 633 | .map((line) => JSON.parse(line) as TrajectoryEvent); |
634 | | -expect(trajectoryEvents.some((event) => event.type === "prompt.submitted")).toBe(false); |
| 634 | +expect(trajectoryEvents.filter((event) => event.type === "prompt.submitted")).toEqual([]); |
635 | 635 | expect(trajectoryEvents).toEqual( |
636 | 636 | expect.arrayContaining([ |
637 | 637 | expect.objectContaining({ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -79,7 +79,7 @@ describe("stepIdleTimeoutBreaker (#76293)", () => {
|
79 | 79 | ], |
80 | 80 | { cap: 0 }, |
81 | 81 | ); |
82 | | -expect(steps.every((s) => !s.tripped)).toBe(true); |
| 82 | +expect(steps.filter((step) => step.tripped)).toEqual([]); |
83 | 83 | expect(steps.at(-1)?.consecutive).toBe(7); |
84 | 84 | }); |
85 | 85 | |
@@ -94,7 +94,7 @@ describe("stepIdleTimeoutBreaker (#76293)", () => {
|
94 | 94 | outputTokens: 220, |
95 | 95 | })), |
96 | 96 | ); |
97 | | -expect(steps.every((s) => !s.tripped)).toBe(true); |
| 97 | +expect(steps.filter((step) => step.tripped)).toEqual([]); |
98 | 98 | expect(steps.at(-1)?.consecutive).toBe(0); |
99 | 99 | }); |
100 | 100 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -80,7 +80,7 @@ describe("detectImageReferences", () => {
|
80 | 80 | 1, |
81 | 81 | ); |
82 | 82 | |
83 | | -expect(refs.some((r) => r.type === "path")).toBe(true); |
| 83 | +expect(refs.map((ref) => ref.type)).toContain("path"); |
84 | 84 | }); |
85 | 85 | |
86 | 86 | it("does not leak parser state between calls", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -215,7 +215,7 @@ describe("rewriteTranscriptEntriesInSessionManager", () => {
|
215 | 215 | "rewritten summary entry", |
216 | 216 | ); |
217 | 217 | expect(sessionManager.getLabel(rewrittenSummaryEntry.id)).toBe("bookmark"); |
218 | | -expect(sessionManager.getBranch().some((entry) => entry.type === "label")).toBe(true); |
| 218 | +expect(sessionManager.getBranch().map((entry) => entry.type)).toContain("label"); |
219 | 219 | }); |
220 | 220 | |
221 | 221 | it("remaps compaction keep markers when rewritten entries change ids", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。