test: compare camera image blocks · openclaw/openclaw@68d5a7d
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -105,10 +105,13 @@ function mockNodeList(params?: { commands?: string[]; remoteIp?: string }) {
|
105 | 105 | |
106 | 106 | function expectSingleImage(result: NodesToolResult, params?: { mimeType?: string }) { |
107 | 107 | const images = (result.content ?? []).filter((block) => block.type === "image"); |
108 | | -expect(images).toHaveLength(1); |
109 | | -if (params?.mimeType) { |
110 | | -expect(images[0]?.mimeType).toBe(params.mimeType); |
111 | | -} |
| 108 | +expect(images).toEqual([ |
| 109 | +{ |
| 110 | +type: "image", |
| 111 | +data: JPG_PAYLOAD.base64, |
| 112 | +mimeType: params?.mimeType ?? "image/jpeg", |
| 113 | +}, |
| 114 | +]); |
112 | 115 | } |
113 | 116 | |
114 | 117 | function expectNoImages(result: NodesToolResult) { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。