test: specify read tool text content · openclaw/openclaw@e732c51
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1058,13 +1058,7 @@ describe("createOpenClawCodingTools", () => {
|
1058 | 1058 | path: textPath, |
1059 | 1059 | }); |
1060 | 1060 | |
1061 | | -expect(textResult?.content?.some((block) => block.type === "image")).toBe(false); |
1062 | | -const textBlocks = textResult?.content?.filter((block) => block.type === "text") as |
1063 | | -| Array<{ text?: string }> |
1064 | | -| undefined; |
1065 | | -expect(textBlocks?.length ?? 0).toBeGreaterThan(0); |
1066 | | -const combinedText = textBlocks?.map((block) => block.text ?? "").join("\n"); |
1067 | | -expect(combinedText).toContain(contents); |
| 1061 | +expect(textResult?.content).toEqual([{ type: "text", text: contents }]); |
1068 | 1062 | } finally { |
1069 | 1063 | await fs.rm(tmpDir, { recursive: true, force: true }); |
1070 | 1064 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。