bun-test-patterns
CommunityBun test patterns for Jest-compatible testing.
Authorshepherdjerred
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill delivers a consolidated guide for Bun-based testing workflows, covering mocks, snapshots, coverage, and DOM testing patterns to streamline building reliable test suites.
Core Features & Use Cases
- Vitest compatibility: alias vi for easier migration from Vitest/Jest-style syntax.
- Module mocking: mock.module() for ESM/CJS module mocking.
- Type testing: expectTypeOf for TypeScript type assertions.
- Custom matchers: expect.extend() for user-defined assertions.
- Test automation: built-in coverage, watch mode, and deterministic test execution.
- DOM testing: setups with Happy DOM and Testing Library for component tests.
Quick Start
Run bun test to execute all tests. To run a specific file, use bun test path/to/file.ts. Enable watch mode with bun test --watch and enable coverage with bun test --coverage.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: bun-test-patterns Download link: https://github.com/shepherdjerred/dotfiles/archive/main.zip#bun-test-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.