secondsky avatar

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-code

Installs 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
1openai avatartest-coverage-improveropenai/openai-agents-pythonImprove test coverage in the OpenAI Agents Python repository: run `make coverage`, inspect coverage artifacts, identify low-coverage files, propose high-impact 266skills.sh installs
2proffesor-for-testing avatartest-design-techniquesproffesor-for-testing/agentic-qeSystematic test design with boundary value analysis, equivalence partitioning, decision tables, state transition testing, and combinatorial testing. Use when de202skills.sh installs
3naodeng avatartest-case-writingnaodeng/awesome-qa-skillsUse this skill when you need to create high-quality test cases with normal, exception, and boundary scenarios; triggers include test case writing and test desig455skills.sh installs
4currents-dev avatarplaywright-best-practicescurrents-dev/playwright-best-practices-skillUse when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking AP104.5Kskills.sh installs
5momentic-ai avatarmomentic-testmomentic-ai/skillsCreate, run, and maintain Momentic E2E tests and modules, which are serialized to disk as *.test.yaml and *.module.yaml files. Momentic uses fast, accurate AI a68.5Kskills.sh installs
6clerk avatarclerk-testingclerk/skillsE2E testing for Clerk apps. Use with Playwright or Cypress for auth flow tests.48.2Kskills.sh installs