bun-test-coverage
SolidUse 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
Quality Score: 89/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
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
Testing & QA Solid
bun-test-basics
Use for bun:test syntax, assertions, describe/it, test.skip/only/each, and basic patterns.
168 Updated 4 weeks ago
secondsky Data & Documents Solid
bun-runtime
Use for Bun runtime, bunfig.toml, watch/hot modes, env vars, CLI flags, and module resolution.
168 Updated 4 weeks ago
secondsky Testing & QA Solid
bun-development
Modern JavaScript/TypeScript development with Bun runtime. Covers package management, bundling, testing, and migration from Node.js. Use when working with Bun, optimizing JS/TS development speed, or migrating from Node.js to Bun.
27,984 Updated today
davila7