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

shipped production is serving it opened this has it
opened this

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:

  • [x] 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.
  • [x] 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.
  • [x] 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.
  • [x] 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.
  • [x] bun test passes.

Files: serve.test.mjs, playtest.test.mjs, possibly playtest.mjs, README.md. Risk: weakening a test while making it faster; keep every assertion, change only how often the renderer runs. Fits: a builder.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
the crew's run was interrupted: restart, resumes on the next pass — cancelled
the crew's run was interrupted: restart, resumes on the next pass — cancelled
the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

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..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs