Bun Test Basics
Basic bun:test guide covering syntax, assertions, modifiers, and CLI options for the built-in runner.
- CCM score
- 51 of 100
- skills.sh installs
- 485
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers test files, describe/it blocks, parameterized tests, concurrent execution, and common matchers for
expect - Includes modifiers
test.skip,test.only,test.todo, andtest.failing, plustest.eachfor table-driven cases - Flags
test.onlyas local-debugging only, sincebun testexits non-zero in CI when a file uses it - Lists CLI options such as
--timeout,--bail,--watch,--randomize, and-tfor name filtering
Install
$ npx -y skills add secondsky/claude-skills --skill bun-test-basics -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Bun Test Basics
Bun ships with a fast, built-in, Jest-compatible test runner. Tests run with the Bun runtime and support TypeScript/JSX natively.
Quick Start
# Run all tests
bun test
# Run specific file
bun test ./test/math.test.ts
# Run tests matching pattern
bun test --test-name-pattern "addition"
Writing Tests
import { test, expect, describe } from "bun:test";
test("2 + 2", () => {
expect(2 + 2).toBe(4);
});
describe("math", () => {
test("addition", () => {
expect(1 + 1).toBe(2);
});
test("subtraction", () => {
expect(5 - 3).toBe(2);
});
});
Test File Patterns
Bun discovers test files matching:
*.test.{js|jsx|ts|tsx}*_test.{js|jsx|ts|tsx}*.spec.{js|jsx|ts|tsx}*_spec.{js|jsx|ts|tsx}
Test Modifiers
// Skip a test
test.skip("not ready", () => {
// won't run
});
// Only run this test
test.only("focus on this", () => {
// other tests won't run
});
// NOTE: in Bun 1.3+ `bun test` exits non-zero in CI when a file uses
// `test.only`. Use it for local debugging only — never commit it.
// Placeholder for future test
test.todo("implement later");
Details
- Repository
- github.com/secondsky/claude-skills
- Category
- Testing & QA
- First seen
- Jun 3, 2026
Questions
What does the bun-test-basics skill cover?
It covers bun:test syntax, assertions, describe and it blocks, test.skip, test.only and test.each, plus basic test patterns. The skill's SKILL.md explains how to run tests with bun test and how to write matchers like toBe, toEqual and toThrow.
How do I install the bun-test-basics skill?
Run npx -y skills add secondsky/claude-skills --skill bun-test-basics -y in your project. Once installed, the agent can help you write and run Bun tests using the bun:test runner.
Which skills rank alongside bun-test-basics in the Testing & QA category?
bun-test-basics sits in the Testing & QA category on Claude Marketplaces, alongside tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. Its focus is narrower than those, centered on Bun's built-in test runner and its syntax.
More from secondsky/claude-skills
All 116- Payment Gateway Integration484
- Test Quality Analysis481
- Bun Hono Integration477
- Api Reference Documentation476
- Mutation Testing474
- Security Headers Configuration473
- Tanstack Router472
- Internationalization I18n469
- Seo Optimizer469
- Systematic Debugging469
- Bun Package Manager466
- Interaction Design466
- Api Error Handling465
- Sequential Thinking461
- Bun Nextjs453
- Websocket Implementation452
- Root Cause Tracing450
- Seo Keyword Cluster Builder450
- Mobile App Debugging449
- Recommendation Engine449
- App Store Deployment448
- Push Notification Setup447
- Api Response Optimization445
- Drizzle Orm D1445
Similar to Bun Test Basics
More Testing & QAvitest-testingsecondsky/claude-skills1.3K installsModern Vitest guide for TypeScript and JavaScript tests, covering unit, integration, mocking, and coverage workflows.
unit-testsmicrosoft/vscode257 installsUnit-test runner guide covering the runTests tool and the platform scripts with filtering, globbing, and parallel options.
bun-test-coveragesecondsky/claude-skills427 installsBun-native test coverage with lcov reports, per-metric thresholds, and CI-ready output configuration.
shell-testing-frameworkmanutej/luxor-claude-marketplace442 installsBash testing guide built on unix-goto patterns, requiring 100% coverage across four test categories.
vitestantfu/skills50.1K installsVitest-based unit testing guidance covering the Jest-compatible API, mocking, coverage, and test filtering.
unit-testing-frameworkaj-geddes/useful-ai-prompts637 installsStructured guidance for writing unit tests with Jest, pytest, JUnit, or RSpec, following the AAA pattern.