- Add deterministic mocking for Math.random() in garbage tests
- Add edge case tests for piece positioning at boundaries
- Add tests for negative Y positions (spawn area)
- Improve lockPieceToBoard tests with proper I piece shape handling
- Add performance tests for checkBoardOverflow and createEmptyBoard
- Add tests for multiple garbage rows and board overflow scenarios
- Fix test expectations to match actual game logic behavior
- Total tests increased from 57 to 105
- 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