feat: split Install/UnitTest stages, add game.js tests with 100% coverage

21 tests covering win/loss/draw/score/reset. lcov report fed to SonarQube.
Pipeline: Install → Unit Test → Scan Code Quality → Build & Push.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-02 16:10:27 +07:00
parent 93dea76004
commit 4d5657f259
4 changed files with 843 additions and 17 deletions

View File

@@ -5,13 +5,19 @@
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "jest"
"test": "jest --coverage"
},
"dependencies": {
"express": "^4.18.2"
},
"devDependencies": {
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"supertest": "^6.3.3"
},
"jest": {
"collectCoverageFrom": ["index.js", "public/game.js"],
"coverageReporters": ["lcov", "text"],
"coverageDirectory": "coverage"
}
}