// VIZ-4 dev/01,03,04,05: DOM-rendered assertions. The SPA is client-rendered (server.ts serves a // static SHELL, `server.ts:209-214`-ish), so a plain `curl /` cannot see what actually renders — // this suite adds the DOM runtime (happy-dom, root devDependency) `bun test` was missing and // boots the REAL `ztrack visualizer` server against REAL `ztrack init` fixtures (same pattern as // `src/visualizer.e2e.test.ts` / `src/visualizerViz3.e2e.test.ts`: symlink node_modules/ztrack -> // this checkout, run the real CLI, spawn the real server). `main.tsx` is imported directly from // SOURCE (Bun transpiles TSX on the fly) rather than by executing the built `/assets/app.js` // bundle — it is "the React tree directly ... against a fetched ... payload" (the task's second // allowed design), and the payload is genuinely the booted server's own `/api/board` output: // `fetch('/api/board')` inside `main.tsx` is untouched (a relative URL); the test only rewrites // the ORIGIN so the same app code talks to the real fixture server. // // dev/03 (speckit) additionally asserts the served `/assets/app.js` BUNDLE contains the code // extension's own text ("Functional Requirements") — that is the genuine generated-entry SCAN + // build proof (server.ts's `writeGeneratedEntry`/`scanFirstPartyExtensions`) — and separately // registers that same `client/presets/speckit.tsx` module (the identical file, not a mock) into // the extensions registry the source-imported `main.tsx` also uses, to get a DOM-rendered // assertion without re-implementing a headless-browser