const assert = require("node:assert/strict"); const fs = require("node:fs"); const path = require("node:path"); const test = require("node:test"); const zlib = require("node:zlib"); const samplePath = path.join(__dirname, "..", "..", "docs", "hedge-sample-library.svg"); const sample = fs.readFileSync(samplePath, "utf8"); const runtimePath = path.join(__dirname, "..", "..", "web", "hedges.svg"); const runtime = fs.readFileSync(runtimePath, "utf8"); test("hedge review sheet is local editable SVG with complete stable symbols", () => { assert.match(sample, /^= 20); assert.ok(zlib.gzipSync(sample, {level: 9}).length < sample.length); }); test("runtime hedge sprite remains local and contains approved runtime symbols", () => { assert.match(runtime, /^ { for (const identifier of ["hedge-breach-1", "hedge-breach-2", "hedge-breach-3"]) { const symbol = runtime.match(new RegExp(`([\\s\\S]*?)`))[1]; assert.match(symbol, /fill="#11131a" d="M32 0h96v40H32Z"/); } });