test: tighten music generation assertions · openclaw/openclaw@a550149
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -365,15 +365,14 @@ describe("music-generation runtime", () => {
|
365 | 365 | durationSeconds: 30, |
366 | 366 | }); |
367 | 367 | expect(result.ignoredOverrides).toStrictEqual([]); |
368 | | -expect(result.normalization).toMatchObject({ |
369 | | -durationSeconds: { |
370 | | -requested: 45, |
371 | | -applied: 30, |
372 | | -}, |
373 | | -}); |
374 | | -expect(result.metadata).toMatchObject({ |
375 | | -requestedDurationSeconds: 45, |
376 | | -normalizedDurationSeconds: 30, |
377 | | -}); |
| 368 | +expect(result.normalization).toBeDefined(); |
| 369 | +expect(result.metadata).toBeDefined(); |
| 370 | +if (!result.normalization || !result.metadata) { |
| 371 | +throw new Error("Expected normalization and metadata"); |
| 372 | +} |
| 373 | +expect(result.normalization.durationSeconds?.requested).toBe(45); |
| 374 | +expect(result.normalization.durationSeconds?.applied).toBe(30); |
| 375 | +expect(result.metadata.requestedDurationSeconds).toBe(45); |
| 376 | +expect(result.metadata.normalizedDurationSeconds).toBe(30); |
378 | 377 | }); |
379 | 378 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。