Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
test(studio): print PASS for edit accuracy cases that pass every metric (#4925)
Miguel Ángel703d0e662136
diff --git a/packages/studio/tests/e2e/edit-accuracy/report.mjs b/packages/studio/tests/e2e/edit-accuracy/report.mjsindex be4083a9a2..ade849a651 100644--- a/packages/studio/tests/e2e/edit-accuracy/report.mjs+++ b/packages/studio/tests/e2e/edit-accuracy/report.mjs@@ -66,6 +66,7 @@ export function score(spec, r) {...spec,...r,checks: Object.fromEntries(METRICS.map((m) => [m, false])),+ pass: false,};const smooth = { ...frameBudget(r.smooth), control: frameBudget(r.smooth.control) };const checks = {@@ -96,7 +97,7 @@ export function score(spec, r) {smooth.workMax <= WORK_MS,};for (const m of unsettledMetrics(r)) checks[m] = false;- return { ...spec, ...r, smooth, checks };+ return { ...spec, ...r, smooth, checks, pass: METRICS.every((m) => checks[m]) };}const round = (v) => (typeof v === "number" ? Math.round(v * 100) / 100 : v);diff --git a/packages/studio/tests/e2e/edit-accuracy/report.test.mjs b/packages/studio/tests/e2e/edit-accuracy/report.test.mjsindex 9008c77636..a182b3518b 100644--- a/packages/studio/tests/e2e/edit-accuracy/report.test.mjs+++ b/packages/studio/tests/e2e/edit-accuracy/report.test.mjs@@ -50,3 +50,13 @@ describe("the smooth verdict", () => {expect(accurate(e)).toBe(true);});});++describe("a case's verdict", () => {+ it("passes only when every metric does, smoothness included", () => {+ expect(score({ id: "case" }, result({})).pass).toBe(true);+ expect(score({ id: "case" }, { ...result({}), drop: 1000 }).pass).toBe(false);+ const slow = { ...frames, work: [9, 1, 1], control: frames };+ expect(score({ id: "case" }, { ...result({}), smooth: slow }).pass).toBe(false);+ expect(score({ id: "case" }, { error: "boom" }).pass).toBe(false);+ });+});