testsAndMisc/docs/superpowers/contracts/kcd2-test-split-2026-08-16.json
Krzysztof kuhy Rudnicki 776e04db89 Split the kcd2_dice_solver test files under the cap
Nine new modules from four over-cap test files. Every kcd2 test file is
now under 250 lines; only four source files remain.

App.test.tsx ended up with no describe blocks and vitest failed with
"No test suite found" - a split that empties a file has to delete it.
The shared `response`/`ordinary` fixtures went to src/test/fixtures.ts,
which vite.config.ts excludes from coverage; beside the source they
would have counted as production code and broken the 100% gate.

288 tests passing before and after, now across 24 files instead of 15,
coverage still 100% on all four metrics.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-16 20:03:33 +02:00

19 lines
1.3 KiB
JSON

{
"title": "Split the kcd2_dice_solver test files under the 250-line cap",
"objective": "Bring every kcd2 test file under the cap by partitioning at describe boundaries, taking the package from twelve violations to four source files.",
"acceptance_criteria": [
"No kcd2_dice_solver test file is over 250 lines.",
"The suite still reports exactly 288 passing tests -- the same as before the split, though spread across 24 files instead of 15.",
"Coverage stays at 100% for statements, branches, functions and lines.",
"npm run lint passes with no new suppression and no eslint-disable.",
"A fixture shared by two split halves goes in src/test/, which vite.config.ts excludes from coverage. A fixture placed beside the source would be counted as production code and break the 100% gate.",
"No test is deleted, skipped or weakened; whole describe blocks move verbatim.",
"No empty test file is left behind: a file whose last describe moved out is removed, since vitest fails on 'No test suite found'."
],
"out_of_scope": [
"search.ts, scoring.ts, badgeValue.ts and App.tsx, which are source files.",
"Changing what any test asserts."
],
"verifier": "npm test -- --run (expects exactly 288 passed), npm run coverage (100% on all four metrics), npm run lint, and check_file_length.sh over kcd2_dice_solver."
}