comeonoliver/skillshub/bun-test-lifecycle
Claude Code and agent skill by comeonoliver/skillshub
- 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 comeonoliver/skillshub/bun-test-lifecycleSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as comeonoliver/skillshub/bun-test-lifecycle.
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, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/secondsky/claude-skills/bun-test-lifecycle/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
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/comeonoliver/skillshub/bun-test-lifecycle)