daleseo/bun-skills/bun-test
Claude Code and agent skill by daleseo/bun-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Configure Bun's built-in test runner with Jest-compatible APIs. Use when setting up testing infrastructure, writing unit/integration/snapshot tests, migrating from Jest, or configuring test coverage. 3-10x faster than Jest.
Install
npx vskill@latest install daleseo/bun-skills/bun-testSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
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
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
Recommended structure:
4. Configure Bun Test
Create bunfig.toml in project root:
5. Create Test Setup File
Create tests/setup.ts:
6. Write First Test
Create tests/unit/example.test.ts:
For more test examples (API testing, database testing, etc.), see examples.md.
7. Add Mocking (If Needed)
For advanced mocking patterns, see mocking.md.
8. Update package.json
Add test scripts:
9. Run Tests
Jest Migration
If migrating from Jest, see jest-migration.md for:
- Import updates (
@jest/globals→bun:test) - Mock syntax changes (
jest.fn()→mock()) - Configuration migration
- Compatibility notes
Key changes:
Common Test Patterns
Testing Functions
Testing Errors
Snapshot Testing
Matchers Reference
Common matchers available:
Test Organization
Setup and Teardown
Coverage Configuration
View coverage report:
Set coverage thresholds in bunfig.toml:
Debugging Tests
Performance
Bun test is significantly faster than Jest:
- Jest: ~15 seconds for 100 tests
- Bun: ~2 seconds for 100 tests
3-10x faster execution!
Completion Checklist
- ✅ Test directory structure created
- ✅ bunfig.toml configured
- ✅ Test setup file created
- ✅ Example tests written
- ✅ Package.json scripts updated
- ✅ Tests run successfully
- ✅ Coverage configured (if needed)
Next Steps
After basic setup:
- Write tests: Add tests for critical business logic
- CI/CD: Configure tests to run in your pipeline
- Coverage: Set up coverage reporting
- Pre-commit: Add pre-commit hooks to run tests
- Documentation: Document testing patterns for the team
For detailed implementations, see the reference files linked above.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/bun-test/SKILL.md
Popularity
- Repository stars
- 3
- Repository forks
- 1
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 25 Mar 2026, 8 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/daleseo/bun-skills/bun-test)