Coverage Until Threshold
Coding
by loops! by elorm
Add focused tests until coverage meets your threshold (e.g. 80%), without changing production behavior unnecessarily.
Prompt
Step 1 — Measure coverage Run tests with coverage reporting enabled. Check: `npm test -- --coverage` Step 2 — Add tests Write the smallest tests needed to cover uncovered branches. No snapshot spam or trivial asserts. Step 3 — Re-measure Re-run coverage and confirm threshold is met. Check: `npm test -- --coverage` Step 4 — Repeat until done Repeat the steps above until: Coverage threshold met and all tests pass Check with: `npm test -- --coverage` Stop after 12 iterations and report what is blocking.
Platforms
CLAUDE
CLAUDE
Use this prompt in AIniverse
Tap to copy, run it on ChatGPT / Claude / Gemini, save to your stack, or remix.
Open in AppMore Coding prompts
Independent Verifier Pass
When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implement...
API Contract Until Match
Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.
De-Sloppify Pass
After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with pro...
Merge Conflict Resolver
Rebase or merge target branch, resolve conflicts file by file, and loop until the branch is current and tests pass.