bun-test

Configure Bun's test runner for Jest-compatible tests in JavaScript and TypeScript projects.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/involvex/skills --skill bun-test-involvex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-test
Source: https://github.com/involvex/skills/tree/main/skills/bun-test
Command: npx skills add https://github.com/involvex/skills --skill bun-test-involvex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Configure and run Jest-compatible tests using Bun to dramatically reduce test execution time and simplify migration from Jest, eliminating slow local runs and long CI pipelines.

Core Features & Use Cases

  • Faster Execution: Leverage Bun's built-in test runner for 3-10x faster test runs compared to Jest.
  • Jest Migration: Straightforward guidance for replacing Jest imports and mocks with Bun's test APIs and updating configuration.
  • Mocking & Coverage: Patterns for mock functions, spies, module mocking, and coverage reporting with bunfig.toml and package.json scripts.
  • Use Case: Migrate a TypeScript service test suite from Jest to Bun to speed up developer feedback loops and CI test stages while preserving snapshots and coverage thresholds.

Quick Start

Run the project's tests with Bun using bunfig.toml for configuration and the tests/setup.ts preload file.

Frequently Asked Questions about bun-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Jest tests to Bun to speed up test execution?

To migrate Jest tests to Bun, replace Jest imports and mocks with Bun's built-in test APIs, then update your bunfig.toml configuration and package.json scripts to run unit, integration, and snapshot tests 3-10x faster.

Does Bun's test runner support module mocking and code coverage reporting?

Yes, Bun's test runner supports module mocking, spies, and mock functions. You can configure code coverage reporting and thresholds using bunfig.toml alongside updated package.json scripts.

What is the best way to configure Bun test runner for a TypeScript project?

Configuring Bun's test runner for TypeScript involves creating a bunfig.toml file for settings and using a preload setup file like tests/setup.ts to initialize the test environment before execution.

Can I use Bun to run Jest-compatible snapshot tests in CI pipelines?

Yes, you can use Bun to run Jest-compatible snapshot tests in CI pipelines. Updating package.json scripts to use bun test preserves existing snapshots while significantly reducing CI test stage execution time.

Do I need Bun 1.0 or higher to set up local and CI test suites?

Yes, you need Bun 1.0 or higher to configure local and CI test suites. This version provides the built-in test runner, bunfig.toml configuration support, and preload setup required for execution.

Why are my Jest mocks not working after migrating to Bun's test runner?

Jest mocks may not work after migrating to Bun because they require replacement with Bun's specific test APIs and mock functions. You must update your preload setup and configuration to match Bun's syntax.