6749777b45
game.test.js: rewritten for the new {type, rolls} action shape and 5-stat
player model. The full-playthrough test now walks the real 212-space board
turn by turn (deterministic dummy rolls — always the low end of each die's
range) until finish, asserting every stat stays numeric and every one of
the 9 real tile types actually gets resolved along the way. board-shape
assertions updated to match (212 spaces, no `choices` populated yet).
tileEffects.test.js (new): unit tests per tile type in isolation, including
exact deterministic assertions against real placeholder-table content (roll
a known value, assert the exact banded effect) and a multi-table
roll_table_ref cross-check computed independently from the raw table data —
no seeded-rng machinery anywhere, same explicit-action-value pattern the
reducer tests already used. Also a sweep resolving every real tile across
the full range of its die to catch any type/die combination that throws.
package.json: test script now runs shared/*.test.js instead of naming one
file.
19 lines
464 B
JSON
19 lines
464 B
JSON
{
|
|
"name": "life-journey-server",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Async multiplayer board game — Phase 1 (rooms, reducer, persistence)",
|
|
"main": "server/index.js",
|
|
"scripts": {
|
|
"start": "node server/index.js",
|
|
"dev": "node --watch server/index.js",
|
|
"test": "node --test shared/*.test.js"
|
|
},
|
|
"dependencies": {
|
|
"better-sqlite3": "^11.3.0",
|
|
"express": "^4.19.2",
|
|
"ws": "^8.18.0"
|
|
}
|
|
}
|