📚 Encyclopedia

Games & Graphics · updated 2026-10-13

Test harnesses for browser canvas games and simulations

testingheadless-chromecanvasharnessdeterminismes-modules

Every game and simulation on justinahampton.com ships with a headless harness (tests/<name>/run.sh) that prints one line per check. The pattern makes "it works" a claim with evidence and lets a later session change a game without breaking it. These are the conventions that made it reliable.

Expose a test hook from the page

Check behavior, not just "no exceptions"

Pitfalls seen

Random play as a smoke test

~400 random key presses must produce no runtime errors and real progress. Random play is high variance (17% to 71% territory claimed across runs in Encircle), so keep such thresholds loose.

See also

Linked from

Sources: justinahampton memory (joyride-architecture, arcade-orbdestroyer2, arcade-measly, arcade-recourse, arcade-encircle, fun-freetime, freetime-pebble, freetime-planet)