// Builds web/index.html from web/src as build.rs does, runs its script against a stub DOM, // and fails on anything thrown. // // This exists because a ReferenceError at load once blanked the whole UI: a patch // anchored on a function that no longer existed, so `prefsModal` was referenced but // never defined. `node --check` passes that happily -- it is a parse, not a run -- // and every server-side test passed too, because the server was fine. // // node tests/page-smoke.js const vm = require('vm'); const { buildPage } = require('../web/build.mjs'); // What ships: minified, so an id may have lost its quotes. const { html, js: script, script: file } = buildPage('index.html'); if (!new RegExp(`