Get test coverage on an Express/Node API fast — the first 5 tests that catch
94
90%
Does it follow best practices?
Impact
100%
1.26xAverage score across 5 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent correctly sets up testing infrastructure for an inherited Express project and follows the skill's guidance on test prioritization: focusing on high-churn and state-handling routes, writing the 5 core tests without trying to cover everything, and documenting the rationale.",
"type": "weighted_checklist",
"checklist": [
{
"name": "vitest installed",
"description": "package.json devDependencies includes 'vitest'",
"max_score": 5
},
{
"name": "supertest installed",
"description": "package.json devDependencies includes 'supertest' and '@types/supertest'",
"max_score": 5
},
{
"name": "test script is vitest run",
"description": "package.json scripts 'test' value is 'vitest run' (not 'jest', 'mocha', or other runner)",
"max_score": 5
},
{
"name": "test:coverage script",
"description": "package.json scripts includes 'test:coverage' with value 'vitest run --coverage'",
"max_score": 5
},
{
"name": "app exported",
"description": "src/server.ts exports the app (e.g. 'export const app')",
"max_score": 8
},
{
"name": "conditional listen",
"description": "src/server.ts does NOT call app.listen() unconditionally — it guards with NODE_ENV check or omits it",
"max_score": 8
},
{
"name": "5 tests or fewer",
"description": "The test file contains 5 or fewer it() / test() blocks (following the 'start with 5 tests' guidance, not attempting comprehensive coverage)",
"max_score": 10
},
{
"name": "tests subscriptions route",
"description": "Tests target the /api/subscriptions endpoint (matching the identified high-churn route)",
"max_score": 8
},
{
"name": "happy path test",
"description": "Test file includes a test that GETs the subscriptions list and checks status 200",
"max_score": 7
},
{
"name": "validation test",
"description": "Test file includes a test that POSTs invalid data to /api/subscriptions and checks for 400",
"max_score": 7
},
{
"name": "404 test",
"description": "Test file includes a test for a nonexistent subscription ID that checks for 404",
"max_score": 7
},
{
"name": "state-focused rationale",
"description": "testing-strategy.md (or similar) mentions prioritizing routes that handle state, money, or payments as the reason for test selection",
"max_score": 10
},
{
"name": "deliberate scope limit documented",
"description": "testing-strategy.md (or similar) explicitly acknowledges NOT aiming for 100% coverage and explains what was left out",
"max_score": 10
},
{
"name": "no private function tests",
"description": "Test file does NOT import and call internal/private helper functions directly — all assertions go through HTTP routes via supertest",
"max_score": 5
}
]
}