Bun Writing Tests
Learn how to write tests using Bun's Jest-compatible API with support for async tests, timeouts, and various test modifiers
Install
npx skills add jarle/bun-skills --skill Bun Writing testsgit clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-test-writing-tests ~/.claude/skills/Bun-Writing-testsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Writing tests
> Learn how to write tests using Bun's Jest-compatible API with support for async tests, timeouts, and various test modifiers
Define tests with a Jest-like API imported from the built-in `bun:test` module. Long term, Bun aims for complete Jest compatibility; at the moment, a limited set of expect matchers are supported.
## Basic Usage
To define a simple test:
```ts title="math.test.ts" icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import { expect, test } from "bun:test";
test("2 + 2", () => {
expect(2 + 2).toBe(4);
});
```
### Grouping Tests
Tests can be grouped into suites with `describe`.
```ts title="math.test.ts" icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
import { expect, test, describe } from "bun:test";
describe("arithmetic", () => {
test("2 + 2", () => {
expect(2 + 2).toBe(4);
});
test("2 * 2", () => {
expect(2 * 2).toBe(4);
});
});
```
### Async Tests
Tests can be async.Details
- Skill name
Bun Writing tests- Repository
- jarle/bun-skills
- Path
skills/bun-test-writing-tests/SKILL.md- License
- MIT
- Repo updated
- 24 February 2026
FAQ
What does the Bun Writing Tests skill do?
Learn how to write tests using Bun's Jest-compatible API with support for async tests, timeouts, and various test modifiers
How do I install the Bun Writing Tests skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Writing tests. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Bun Writing Tests popular?
It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.
Related skills
Bun Archive
9jarle/bun-skills
Create and extract tar archives with Bun's fast native implementation
Bun Auto Install
9jarle/bun-skills
Bun's automatic package installation feature for standalone script execution
Bun Bun Add
9jarle/bun-skills
Add packages to your project with Bun's fast package manager
Debate
5Magnus-Gille/claude-skills
Run an adversarial debate with a cross-model reviewer (Codex or Antigravity/agy) to stress-test a draft, plan, research claim, or design decision. Use this whenever you need structured critique before finalizing decisions.
Bun Test Runner
9jarle/bun-skills
Bun's fast, built-in, Jest-compatible test runner with TypeScript support, lifecycle hooks, mocking, and watch mode
User Test Memory
5Magnus-Gille/claude-skills
Spawn independent AI agents across one or more ecosystems (Claude, Codex, Antigravity) to user-test the Munin memory system. Each explores with minimal pre-knowledge and returns structured feedback on what works, what's broken, and what's missing.
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.