coverage
Collect and enforce code coverage using Deno
When & Why to Use This Skill
This Claude skill automates the collection and enforcement of code coverage for Deno projects. It enables developers to maintain high software quality by running coverage tasks, verifying results against strict thresholds defined in configuration files, and generating interactive HTML reports to visualize untested code paths.
Use Cases
- Pre-merge Quality Gates: Automatically verify that new code meets 100% coverage thresholds for lines, branches, and functions before submitting pull requests.
- Visualizing Test Gaps: Generate and serve interactive HTML reports to identify specific untested areas in complex logic or serialization paths.
- Continuous Coverage Monitoring: Use specialized Deno tasks to programmatically check and enforce coverage standards during the development lifecycle to prevent regressions.
- Targeted Coverage Analysis: Run coverage checks on specific files to ensure comprehensive testing of critical or newly updated modules.
| name | coverage |
|---|---|
| description | Collect and enforce code coverage using Deno |
| license | MIT |
| compatibility | opencode |
| workflow | deno |
What I do
- Run
deno task coverageto collect coverage data for the codebase - Can also collect coverage for a specific file using
deno task coverage <filename> - Use
deno task coverage:checkto enforce coverage thresholds defined in.denocoveragerc - Use
deno task serve:coverageto serve an HTML coverage report in the browser
When to use me
Use this when you want to measure or verify test coverage:
- After adding new tests
- Before submitting a pull request (coverage must meet 100% thresholds)
- When debugging which areas of the code are under-tested
- To inspect coverage gaps interactively
Notes
- Coverage thresholds are defined in
.denocoveragerc(100% for lines, branches, and functions) - Every test change must be accompanied by coverage that satisfies these thresholds
- The HTML report is helpful for visualizing failing areas in complex serialization paths