// Headless smoke test for ECHO. // // This agent has no browser, so "it parses" was the only verification the game // had. That is not enough: a null deref or a typo'd method only shows at // runtime. So this builds the smallest DOM/Canvas surface the game actually // touches, executes the real script against it, drives it through a full // session, and fails loudly on any exception. // // It cannot tell you whether the game is FUN. It can tell you it runs. // // node smoke-test.mjs # exits non-zero on any failure import { readFileSync } from "node:fs"; import vm from "node:vm"; const html = readFileSync(new URL("./index.html", import.meta.url), "utf8"); const src = html.match(/