test: tighten read truncation assertion · openclaw/openclaw@d466911
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -123,11 +123,9 @@ describe("createOpenClawCodingTools read behavior", () => {
|
123 | 123 | const result = await wrapped.execute("read-strip-1", { path: "demo.txt", limit: 1 }); |
124 | 124 | |
125 | 125 | const details = (result as { details?: { truncation?: Record<string, unknown> } }).details; |
126 | | -expect(details?.truncation).toMatchObject({ |
127 | | -truncated: true, |
128 | | -outputLines: 1, |
129 | | -firstLineExceedsLimit: false, |
130 | | -}); |
| 126 | +expect(details?.truncation?.truncated).toBe(true); |
| 127 | +expect(details?.truncation?.outputLines).toBe(1); |
| 128 | +expect(details?.truncation?.firstLineExceedsLimit).toBe(false); |
131 | 129 | expect(details?.truncation).not.toHaveProperty("content"); |
132 | 130 | }); |
133 | 131 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。