80f59fd3b3
- 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
22 lines
454 B
JSON
22 lines
454 B
JSON
{
|
|
"name": "tetris-battle-royale",
|
|
"version": "1.0.0",
|
|
"description": "Multiplayer Tetris Battle Royale",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"start": "node index.js",
|
|
"dev": "node index.js",
|
|
"test": "jest",
|
|
"test:coverage": "jest --coverage"
|
|
},
|
|
"dependencies": {
|
|
"express": "^4.18.2",
|
|
"socket.io": "^4.7.2",
|
|
"uuid": "^9.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"jest": "^29.7.0",
|
|
"socket.io-client": "^4.8.3"
|
|
}
|
|
}
|