test: specify cli image argv · openclaw/openclaw@5995c1b
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -301,13 +301,14 @@ describe("writeCliImages", () => {
|
301 | 301 | useResume: false, |
302 | 302 | }); |
303 | 303 | |
304 | | -const imageArgIndex = argv.indexOf("--image"); |
305 | | -const promptIndex = argv.indexOf("describe the attached image"); |
306 | | -expect(imageArgIndex).toBeGreaterThanOrEqual(0); |
307 | | -expect(promptIndex).toBeGreaterThanOrEqual(0); |
308 | | -expect(imageArgIndex).toBeGreaterThan(promptIndex); |
309 | | -expect(argv[imageArgIndex + 1]).toContain("openclaw-cli-images"); |
310 | | -expect(argv[imageArgIndex + 1]).not.toBe(sourceImage); |
| 304 | +expect(argv).toStrictEqual([ |
| 305 | +"exec", |
| 306 | +"--json", |
| 307 | +"describe the attached image", |
| 308 | +"--image", |
| 309 | +expect.stringContaining("openclaw-cli-images"), |
| 310 | +]); |
| 311 | +expect(argv[4]).not.toBe(sourceImage); |
311 | 312 | |
312 | 313 | await prepared.cleanupImages?.(); |
313 | 314 | } finally { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。