Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Keep the full `bun test` well inside the deploy's 600 s limit as the catalogue grows #227
Reviewed pull #233 at its head: ticked serve.test.mjs 'every committed card is what the games render now' captures each game once; determinism is checked by a second capture of only a few games (first, middle, last). Every committed card is still compared.; The per-game playtests in playtest.test.mjs cost less without losing what they prove: for example one boot is shared where tests only read it, or the idle and random-play steps run fewer frames. Each of the five behaviours is still asserted for every game.; A test in playtest.test.mjs fails, naming the game, when one game's playtests take longer than a stated budget (generous, e.g. 15 s), so a slow page is caught in its own pull rather than as a whole-suite timeout.; On main, the full bun test runs in under half the old time locally; the README's testing section states the measured time and the per-game budget.; bun test passes..
Every new game adds five software-rendered playtests (
playtest.test.mjs) and a share-card capture (serve.test.mjs), and the whole suite now runs close to the deploy's 600 s limit (about 524 s measured locally on the Mill Race branch). Mill Race (#175) failed its check twice because of that, not because of a bug in the game. Fix the cost of the suite, not the game.Done looks like:
serve.test.mjs'every committed card is what the games render now' captures each game once; determinism is checked by a second capture of only a few games (first, middle, last). Every committed card is still compared.playtest.test.mjscost less without losing what they prove: for example one boot is shared where tests only read it, or the idle and random-play steps run fewer frames. Each of the five behaviours is still asserted for every game.playtest.test.mjsfails, naming the game, when one game's playtests take longer than a stated budget (generous, e.g. 15 s), so a slow page is caught in its own pull rather than as a whole-suite timeout.bun testruns in under half the old time locally; the README's testing section states the measured time and the per-game budget.bun testpasses.Files:
serve.test.mjs,playtest.test.mjs, possiblyplaytest.mjs,README.md. Risk: weakening a test while making it faster; keep every assertion, change only how often the renderer runs. Fits: a builder.