diff --git a/dev/test/site.test.mjs b/dev/test/site.test.mjs index 11462af..6f3ba9e 100644 --- a/dev/test/site.test.mjs +++ b/dev/test/site.test.mjs @@ -6,6 +6,7 @@ import { tmpdir } from "node:os"; import { join } from "node:path"; import { build, SHARE, EXAMPLES, videoChapters, wrapPost, footer, exampleCard, siteFonts } from "../../site/build.mjs"; import { drawing, NAMES } from "../../site/iso.mjs"; +import { CLUSTERS, CUTS, drawnWidths } from "../../site/assets/hero/layout.js"; test("the site builds: markers filled, files copied, every command copyable", () => { const out = mkdtempSync(join(tmpdir(), "buildnotes-site-")); @@ -98,6 +99,28 @@ test("the site builds: markers filled, files copied, every command copyable", () } }); +test("the hero's table: its scene, model, videos, cut images, posters and three.js are all served", () => { + const out = mkdtempSync(join(tmpdir(), "buildnotes-site-")); + try { + const { html } = build({ out }); + const served = (p) => assert.ok(existsSync(join(out, p)), p); + // three.js is the site's own copy, named by an import map that hero.js's imports go through + const map = JSON.parse(html.match(/