
Bun Test Coverage
Covers everything you need for test coverage in Bun without pulling in Istanbul or nyc. You get the coverage flag, lcov output for CI tools like Codecov, configurable thresholds that'll fail your builds, and patterns to exclude test files or fixtures. The bunfig.toml setup is straightforward, and the GitHub Actions example shows exactly how to pipe coverage reports where they need to go. Honestly the built-in reporter is clear enough that you might not need external dashboards for smaller projects. Good reference when you're setting coverage requirements or need to debug why certain files aren't showing up in reports.
- skills.sh installs
- 337
- GitHub stars
- 248
- last updated
- Aug 21, 2026
Install
$ npx -y skills add secondsky/claude-skills --skill bun-test-coverage --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/secondsky/claude-skills
- Category
- Testing & QA
- First seen
- Jun 3, 2026
More from secondsky/claude-skills
All 146- Bun Http Server336
- Bun Test Mocking335
- Nuxt Seo335
- Bun Bundler334
- Bun Workers333
- Bun Shell331
- Bun React Ssr330
- Bun Tanstack Start329
- Cloudflare Workers Performance329
- Bun Hot Reloading328
- Bun Redis328
- Bun Ffi326
- Bun Jest Migration326
- Bun Websocket Server326
- Cloudflare Workers Runtime Apis326
- Swift Best Practices326
- Bun Nuxt323
- Bun Macros322
- Cloudflare Workers Frameworks321
- Supabase Postgres Best Practices319
- Cloudflare Workers Ci Cd318
- Cloudflare Workers Dev Experience317
- Cloudflare Workers Observability315
- Cloudflare Workers Migration310