commit 3800299ac747bb0a289c1d30d5c8a3347e1352a9
parent 563f6c6a6ddc0cf0ee6b2733e3e6fe20ed8e6de5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 29 Oct 2026 00:31:16 -0400
Merge lane/video-modules (M1's registry tests) into lane/video-modules-ui
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 26 insertions(+), 0 deletions(-)
diff --git a/umtool/report-to-video/modules/registry.test.mjs b/umtool/report-to-video/modules/registry.test.mjs
@@ -116,3 +116,29 @@ test("the overlay chain lays a module's region by its placement", () => {
assert.equal(legacy.inputs[0], "-framerate");
assert.doesNotMatch(legacy.chain, /format=rgba/);
});
+
+test("scheduleSlices: each module's slice of the one schedule; moduleProblems: each module's own sentences", async () => {
+ const { scheduleSlices, moduleProblems } = await import("./index.mjs");
+ const doc = {
+ kind: "deck", total: 20, fps: 30, transition: 0.5,
+ segments: [{ id: "a" }, { id: "b", noPip: true }],
+ factcheck: { stamps: [{ claim: "k", verdict: "CORROBORATED", segment: "a", stamp: false }, { claim: "j", verdict: "PARTLY", segment: "a" }] },
+ layout: "feed", posts: [{ id: "p" }], finale: { from: 15, to: 20 },
+ };
+ const s = scheduleSlices(doc);
+ assert.deepEqual(Object.keys(s).sort(), ["counter", "feed", "finale", "rail", "shell", "stamp"]);
+ assert.deepEqual(s.rail.pips, ["a"]);
+ assert.equal(s.counter.stamps.length, 2);
+ assert.equal(s.stamp.stamps.length, 1, "the stamps drawn");
+ assert.deepEqual(scheduleSlices({ kind: "chart" }), {});
+ const manifest = {
+ render: { width: 1920, height: 1080, intro: { style: "boot", brand: "x-kit" },
+ chrome: { engine: "hyperframes", layout: "deck", deck: { qr: { links: "nowhere" }, pip: { spacing: "pitch", pitch: 1 } } } },
+ timeline: [],
+ };
+ const p = moduleProblems(manifest);
+ assert.match(p.qr[0], /qr\.links must be/);
+ assert.match(p.rail[0], /pip\.pitch must be from 8 to 200/);
+ assert.match(p.intro[0], /x-kit" is not a brand kit/);
+ assert.deepEqual(moduleProblems({ render: {}, timeline: [] }), {});
+});