Bun Test Coverage
Bun-native test coverage with lcov reports, per-metric thresholds, and CI-ready output configuration.
- CCM score
- 52 of 100
- skills.sh installs
- 427
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers enabling coverage via
bun test --coverage, console tables with uncovered line numbers, and reporter selection - Includes
text,lcov, andjsonreporters, plusbunfig.tomlsettings for thresholds, output directories, and exclusion patterns - Enforces minimum coverage through
--coverage-thresholdor per-metric lines, functions, and branches thresholds that fail the run - Designed for projects running Bun tests in CI that need lcov output for tools such as Codecov
Install
$ npx -y skills add secondsky/claude-skills --skill bun-test-coverage -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Bun Test Coverage
Bun has built-in code coverage reporting without additional dependencies.
Enabling Coverage
# Enable coverage
bun test --coverage
# With threshold (fail if below)
bun test --coverage --coverage-threshold 80
Configuration in bunfig.toml
[test]
coverage = true
coverageThreshold = 0.8 # 80% minimum
coverageDir = "./coverage"
# Patterns to ignore
coverageSkipTestFiles = true
Coverage Output
------------------|---------|---------|-------------------
File | % Funcs | % Lines | Uncovered Line #s
------------------|---------|---------|-------------------
All files | 85.71 | 89.23 |
src/index.ts | 100.00 | 100.00 |
src/utils.ts | 75.00 | 82.35 | 23-25, 41-43
src/api.ts | 80.00 | 85.00 | 67, 89-92
------------------|---------|---------|-------------------
Coverage Reporters
# Default console output
bun test --coverage
# Generate lcov report
bun test --coverage --coverage-reporter=lcov
# Multiple reporters
bun test --coverage --coverage-reporter=text --coverage-reporter=lcov
Available Reporters
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Testing & QA, DevOps & Cloud
- First seen
- Jun 3, 2026
Questions
What does the bun-test-coverage skill do?
bun-test-coverage covers test coverage with Bun, using the --coverage flag, lcov reports, coverage thresholds and CI integration. It explains how Bun's built-in coverage reporting works without extra dependencies.
How do I install the bun-test-coverage skill?
Run npx -y skills add secondsky/claude-skills --skill bun-test-coverage -y in a project to install bun-test-coverage. After that, the agent can set up Bun test coverage, thresholds and lcov output for that project.
How do I make bun-test-coverage fail a build when coverage is too low?
bun-test-coverage shows how to pass --coverage-threshold 80 to bun test, or set coverageThreshold in bunfig.toml with per-metric minimums for lines, functions and branches. It also covers writing lcov reports so CI tools such as Codecov can read them.
Where does bun-test-coverage sit among other testing skills?
bun-test-coverage is in the Testing & QA category, next to tdd, webapp-testing and test-driven-development. Unlike those, it focuses on Bun's coverage flag, reporters and thresholds rather than test-writing methods.
More from secondsky/claude-skills
All 116- Api Changelog Versioning426
- Dependency Upgrade426
- Idempotency Handling426
- Nuxt Server426
- Bun Cloudflare Workers425
- Bun Workers425
- Bun Http Server424
- Bun Bundler423
- Turborepo423
- Api Versioning Strategy421
- Recommendation System421
- Logging Best Practices419
- Bun Hot Reloading418
- Claude Hook Writer418
- Claude Code Bash Patterns417
- Plan Interview417
- Bun React Ssr416
- Bun Shell416
- Bun Websocket Server414
- Bun Redis412
- Ml Pipeline Automation412
- Nuxt Core411
- Nuxt Data411
- Bun Ffi409
Similar to Bun Test Coverage
More Testing & QAvitest-testingSkillsecondsky/claude-skills1.3K installsModern Vitest guide for TypeScript and JavaScript tests, covering unit, integration, mocking, and coverage workflows.
test-quality-analysisSkillsecondsky/claude-skills481 installsPractical review guide that flags test smells such as overmocking, fragile selectors, flaky async code, and weak assertions.
Test Coverage McpMCP servergoldbergyoni42 starsRead LCOV coverage data for overall project and per-file summaries, plus session baseline diffs.
coverage-analysisSkilltrailofbits/skills6.5K installsCoverage measurement that reveals which code a fuzzing campaign reaches and which blockers stall it.
unit-testsSkillmicrosoft/vscode257 installsUnit-test runner guide covering the runTests tool and the platform scripts with filtering, globbing, and parallel options.
dart-collect-coverageSkilldart-lang/skills21.1K installsDart coverage workflow that collects test data and produces an LCOV report with ignore directives.