Add CI workflow, render snapshots, and keyboard apply shortcuts
CI / test (push) Waiting to run

This commit is contained in:
Rbanh committed 2026-02-18 21:01:22 -05:00
1 parent bfb8275b2f
commit 9ce07c860b
5 files changed
+94 -10

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import test from "node:test";
import assert from "node:assert/strict";
import { createHash } from "node:crypto";
import { compile } from "../src/compile.js";
import fixture from "../examples/esp32-audio.json" with { type: "json" };
function svgHash(svg) {
return createHash("sha256").update(String(svg ?? "")).digest("hex");
}
test("render output for reference fixture remains deterministic", () => {
const outA = compile(fixture, { render_mode: "schematic_stub", show_labels: true });
const outB = compile(fixture, { render_mode: "schematic_stub", show_labels: true });
assert.equal(outA.ok, true);
assert.equal(outB.ok, true);
assert.equal(outA.svg, outB.svg);
assert.equal(svgHash(outA.svg), "c7a3cd161b6129b53e335d689e13b5425ccca6692f263245e3bf2d7b37aab06a");
});