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-code

Installs 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
1bobmatnyc avatarTesting Anti-Patternsbobmatnyc/claude-mpm-skillsNever test mock behavior. Never add test-only methods to production classes. Understand dependencies before mocking. Language-agnostic principles with TypeScrip226skills.sh installs
2community-access avatartesting-strategycommunity-access/accessibility-agentsAccessibility testing decision trees, browser/AT compatibility matrices, manual vs. automated test coverage, regression testing patterns, and acceptance criteri215skills.sh installs
3supabase avatare2e-studio-testssupabase/supabaseRun e2e tests in the Studio app. Use when asked to run e2e tests, run studio tests, playwright tests, or test the feature.211skills.sh installs
4personamanagmentlayer avatartesting-expertpersonamanagmentlayer/pclExpert-level software testing with unit tests, integration tests, E2E tests, TDD/BDD, and testing best practices203skills.sh installs
5itechmeat avatarvitestitechmeat/llm-codeVitest testing framework: Vite-powered tests, Jest-compatible API, mocking, snapshots, coverage, browser mode, and TypeScript support. Use when writing or confi201skills.sh installs
6oguzhan18 avatarangular-testingoguzhan18/angular-ecosystem-skillsALWAYS use when writing tests for Angular applications, including unit tests, component tests, service tests, or E2E tests with Jasmine, Karma, Vitest, or Cypre197skills.sh installs