Status: done (2026-10-29, ed5c5ed)
Priority: 1
Size: S
Design ref: none (test infrastructure)
Goal: npm test today only prints output and passes unless a script crashes. Add assertions so that later nightly work cannot silently break the simulation or the page.
Acceptance criteria:
tests/regress.js exits non-zero if, for seeds 7 and 42 over 3 years of the founders scenario: any household’s grain or wood is NaN or negative, or no household brought in a harvest in year 1.tests/heirs.js exits non-zero if the heir rankings it prints at the start differ from today’s output (record today’s three ranking lines as expected values in the file).tests/smoke.js exits non-zero on a frame error, on any console.error from the page, on a loader timeout, or if the settlers list, customs table (11 rows), family tree or “Skip a year” are missing or empty.tests/smoke.js ticks at least 0.25 s of frames (the panel refreshes every 0.25 s; today it ticks 10 × 16 ms and reads a stale list).npm test fail; the committed suite passes.src/; no new dependencies.
Notes / questions: