
Bun Test
Sets up Bun's built-in test runner with Jest-compatible APIs, so you can write unit, integration, and snapshot tests without adding dependencies. The skill walks through creating test directories, configuring bunfig.toml, writing tests with describe/expect blocks, and setting up mocks and spies. Includes a Jest migration guide since the syntax is nearly identical (just swap imports from @jest/globals to bun:test). The 3-10x speed improvement over Jest is real and noticeable on larger test suites. Good for new Bun projects or migrating existing Jest setups. Covers the basics well, though the advanced mocking patterns require checking the reference docs.
- skills.sh installs
- 228
- GitHub stars
- 4
- last updated
- Aug 21, 2026
Install
$ npx -y skills add daleseo/bun-skills --skill bun-test --agent claude-codeInstalls into .claude/skills of the current project.
Files
Bun Test Configuration
Set up Bun's built-in test runner with Jest-compatible APIs and significantly faster execution (3-10x faster than Jest).
Quick Reference
For detailed patterns, see:
- Jest Migration: jest-migration.md - Complete Jest to Bun migration guide
- Mocking: mocking.md - Mock functions, spies, module mocking
- Examples: examples.md - Test patterns for APIs, databases, async code
Core Workflow
1. Check Prerequisites
# Verify Bun installation
bun --version
# Check if project exists
ls -la package.json
2. Determine Testing Needs
Ask the user what type of testing they need:
- Unit Testing: Test individual functions and modules
- Integration Testing: Test component interactions
- API Testing: Test HTTP endpoints
- Snapshot Testing: Test output consistency
3. Create Test Directory Structure
# Create test directories
mkdir -p tests/{unit,integration,fixtures}
Sponsors
Details
- Repository
- github.com/daleseo/bun-skills
- Categories
- Testing & QA, Documentation, Cloud & Infrastructure
- First seen
- Jun 3, 2026