bun-test-coverage

Solid

Use for test coverage with Bun, --coverage flag, lcov reports, thresholds, and CI integration.

Testing & QA 168 stars 27 forks Updated 4 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Bun Test Coverage Bun has built-in code coverage reporting without additional dependencies. ## Enabling Coverage ```bash # Enable coverage bun test --coverage # With threshold (fail if below) bun test --coverage --coverage-threshold 80 ``` ## Configuration in bunfig.toml ```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 ```bash # 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 | Reporter | Output | |----------|--------| | `text` | Console table (default) | | `lcov` | `coverage/lcov.info` for CI tools | | `json` | `coverage/coverage.json` | ## Coverage Thresholds Set minimum coverage requirements: ```bash # Fail if coverage < 80% bun test --coverage --coverage-threshold 80 # Per-metric thresholds in bunfig.toml ``` ```t...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
7 months ago
Last Updated
4 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category