test: clarify staged media output assertions · openclaw/openclaw@08337a1
shakkernerd
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -235,7 +235,9 @@ describe("google video generation provider", () => {
|
235 | 235 | }); |
236 | 236 | |
237 | 237 | const [{ downloadPath }] = downloadMock.mock.calls[0] ?? [{}]; |
238 | | -expect(path.basename(String(downloadPath))).toBe("video-1.mp4"); |
| 238 | +const downloadBaseName = path.basename(String(downloadPath)); |
| 239 | +expect(downloadBaseName).toContain("video-1.mp4"); |
| 240 | +expect(downloadBaseName).toMatch(/\.part$/); |
239 | 241 | expect(result.videos[0]?.buffer).toEqual(Buffer.from("sdk-video")); |
240 | 242 | expect(result.videos[0]?.fileName).toBe("video-1.mp4"); |
241 | 243 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -111,7 +111,8 @@ describe("edgeTTS empty audio validation", () => {
|
111 | 111 | ), |
112 | 112 | ).resolves.toBeUndefined(); |
113 | 113 | expect(stagedPath).not.toBe(outputPath); |
114 | | -expect(path.basename(stagedPath)).toBe(path.basename(outputPath)); |
| 114 | +expect(path.basename(stagedPath)).toContain(path.basename(outputPath)); |
| 115 | +expect(path.basename(stagedPath)).toMatch(/\.part$/); |
115 | 116 | expect(readFileSync(outputPath)).toEqual(Buffer.from([0xff, 0xfb, 0x90, 0x00])); |
116 | 117 | expect(existsSync(stagedPath)).toBe(false); |
117 | 118 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。