secondsky/claude-skills/bun-test-lifecycle
Claude Code and agent skill by secondsky/claude-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use for test lifecycle hooks: beforeAll, afterAll, beforeEach, afterEach, fixtures, preload.
Install
npx vskill@latest install secondsky/claude-skills/bun-test-lifecycleSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Bun Test Lifecycle
Bun supports Jest-compatible lifecycle hooks for test setup and teardown.
Lifecycle Hooks
Hook Execution Order
Nested Describe Hooks
Async Hooks
Timeout for Hooks
Preload Scripts
Use --preload for global setup across all test files:
setup.ts
Configure in bunfig.toml
Common Patterns
Database Setup
Server Setup
Mock Setup
Environment Variables
Shared Fixtures
Hook Errors
If a hook throws, all tests in that describe block fail:
Common Errors
| Error | Cause | Fix | |
|---|---|---|---|
beforeAll timeout | Slow async setup | Increase timeout | |
Hook not called | Wrong scope | Check hook placement | |
Cleanup not run | afterAll skipped | Ensure no throws in tests | |
State leak | Missing cleanup | Add proper afterEach |
When to Load References
Load references/preload-scripts.md when:
- Complex global setup
- Multiple preload files
Load references/fixtures.md when:
- Reusable test fixtures
- Factory patterns
Security
- Security scanPassed, 91 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/bun/skills/bun-test-lifecycle/SKILL.md
Popularity
- Repository stars
- 128
- Repository forks
- 16
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 1 May 2026, 7 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/secondsky/claude-skills/bun-test-lifecycle)