Add unit and integration tests for garbage system

- Extract pure game logic functions to game-logic.js for testability
- Add Jest testing framework with 57 tests covering:
  * Unit tests for pure functions (createEmptyBoard, checkBoardOverflow, etc.)
  * Integration tests for garbage system (addGarbageToPlayer, sendGarbage)
  * Socket.io integration tests for multiplayer flow
- Refactor index.js to use extracted functions
- Tests verify garbage elimination bug fix: players only eliminated when board overflows
This commit is contained in:
2026-03-21 08:55:23 +00:00
parent 7d385806df
commit 80f59fd3b3
7 changed files with 4627 additions and 108 deletions
+3461
View File
File diff suppressed because it is too large Load Diff