commit 45ea48caefc0cb6b36ba96957683adf51ddb1612
parent 963594cd4714ab71d33b2c8a0e13b52f1b4e0ca5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 28 Oct 2026 23:50:47 -0400
umtool: registry tests -- schedule slices and each module's own sentences
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: [] }), {});
+});