Bun Test Basics
Bun ships with a fast, built-in, Jest-compatible test runner. Tests run with the Bun runtime and support TypeScript/JSX natively.
Quick Start
Writing Tests
Test File Patterns
Bun discovers test files matching:
*.test.{js|jsx|ts|tsx}*_test.{js|jsx|ts|tsx}*.spec.{js|jsx|ts|tsx}*_spec.{js|jsx|ts|tsx}
Test Modifiers
Parameterized Tests
Concurrent Tests
Common Matchers
CLI Options
Output Reporters
Common Errors
When to Load References
Load references/matchers.md when:
- Need complete matcher reference
- Custom matcher patterns
Load references/cli-options.md when:
- Full CLI flag reference
- Advanced execution options


