test: tighten moonshot video content assertion · openclaw/openclaw@54d0baa
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -54,10 +54,12 @@ describe("describeMoonshotVideo", () => {
|
54 | 54 | if (!content) { |
55 | 55 | throw new Error("expected Moonshot user content"); |
56 | 56 | } |
57 | | -expect(content[0]).toMatchObject({ |
58 | | -type: "text", |
59 | | -text: "Describe the video.", |
60 | | -}); |
| 57 | +const [textContent] = content; |
| 58 | +if (!textContent) { |
| 59 | +throw new Error("expected Moonshot text content"); |
| 60 | +} |
| 61 | +expect(textContent.type).toBe("text"); |
| 62 | +expect(textContent.text).toBe("Describe the video."); |
61 | 63 | const videoContent = content[1]; |
62 | 64 | if (!videoContent) { |
63 | 65 | throw new Error("expected Moonshot video content"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。