Split The code is public; the app answers only to the crew.

The round's damage report is 64 lines nobody tests: drive drawReport with the recording context hud.test.ts already has #239

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Pushed and `bun run check` is green.

shipped merged

opened this

Pushed and bun run check is green.

src/client/reportPanel.test.ts now drives drawReport through the same recording 2D context the rest of the HUD tests use. I lifted recorder()/Call out of hud.test.ts into src/client/recorder.test-helper.ts (the .test-helper.ts suffix keeps it out of bun test's discovery glob) and had hud.test.ts import it, with no change to its own tests or behaviour.

New coverage: nothing is drawn in freeze, live, or planted; the panel appears in over; a round with no damage draws "nothing" under both "Dealt" and "Took"; six opponents hit draws exactly five damage lines (MAX_LINES capping); the panel's width stays within width - 24 on a 360px screen; and the total line matches report()'s output exactly.

No bug turned up in reportPanel.ts, so it's unchanged. All 865 tests pass.

Closes #201

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs