| description | Run tests using Bun's built-in test runner with compact, agent-friendly output. Use when running bun tests, targeting a file or pattern, collecting coverage with `--coverage`, enabling watch mode, or emitting JUnit XML for CI. |
| args | [pattern] [--coverage] [--bail] [--watch] |
| allowed-tools | Bash, BashOutput, Read |
| argument-hint | [test-pattern] [--coverage] [--bail] [--watch] |
| created | "2025-12-20T00:00:00.000Z" |
| modified | "2026-05-09T00:00:00.000Z" |
| reviewed | "2025-12-20T00:00:00.000Z" |
| name | bun-test |
/bun:test
Run tests using Bun's built-in test runner with optimized output.
When to Use This Skill
| Scenario | Use this skill | Alternative |
|---|
| Quickly running tests with compact output | Yes | N/A |
| Running a specific test file or pattern | Yes | N/A |
| Running tests with coverage | Yes | N/A |
| Configuring test runner options in detail | No - use bun-development | Full test configuration guidance |
| Debugging failing tests interactively | No - use typescript-debugging | Inspector-based debugging |
Parameters
pattern (optional): Test file or name pattern
--coverage: Enable code coverage reporting
--bail: Stop on first failure
--watch: Watch mode for development
Execution
Quick feedback (default for agentic use):
bun test --dots --bail=1 $PATTERN
With coverage:
bun test --dots --coverage $PATTERN
Watch mode:
bun test --watch $PATTERN
CI mode (JUnit output):
bun test --reporter=junit --reporter-outfile=junit.xml $PATTERN
Output Interpretation
| Symbol | Meaning |
|---|
. | Test passed |
F | Test failed |
S | Test skipped |
Agentic Optimizations
| Context | Command |
|---|
| Quick test | bun test --dots --bail=1 |
| Filtered test | bun test --dots --bail=1 -t "pattern" |
| With coverage | bun test --dots --coverage |
| CI output | bun test --reporter=junit --reporter-outfile=junit.xml |
| Watch mode | bun test --watch |
Post-test
- Report pass/fail summary
- If failures: show first failure details
- If coverage enabled: report coverage percentage