""" Every SPA module parses. This is the cheapest possible test and the suite did not have it, which is how a `${/* ... */''}` — htm template syntax, pasted into a plain object literal — reached a committed file. Nothing else here would catch it: the source-reading guards (`test_hook_ordering`, `test_transport_contracts`, `test_spa_ordering`) match patterns in text that parses or does not, and the browser harnesses only load the few modules they need. **`node --check foo.js` is not the check.** It reports success on exactly the file above: given a `.js` extension it makes its own decision about how to parse, and a module-syntax error inside one can come back clean. Copying to `.mjs` first is what forces the module parser, and it is the difference between a green run and a real one — the same shape as the "a test that models a fix agrees with it by construction" note in CLAUDE.md, one level lower. It says nothing about names, imports resolving, or hooks being in order. Those have their own tests. This one only says the file is JavaScript. """ import shutil import subprocess from pathlib import Path import pytest STATIC = Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" / "static" pytestmark = pytest.mark.skipif( shutil.which("node") is None or not STATIC.exists(), reason="node or the SPA sources are not available") def _modules() -> list[Path]: # vendor/ is third-party and shipped as-is; sw.js is a service worker, a # classic script by definition, and transport.js is loaded with a plain #