bun-testing

Installation
SKILL.md

Bun Testing Skill

Quick Reference

  • Framework: bun:test
  • File pattern: *.test.ts inside __tests__ directories
  • Module mocking: Use ModuleMocker from @/__tests__ (see patterns)
  • Coverage target: 60–80% (focus on important logic, not 100%)
  • Config: .env.test for test environment variables

Test Utilities (src/tests/)

Before writing custom test helpers, check existing utilities:

  • createTestApp(basePath, route, middleware[]) - Creates test Hono app with error handler, logger, and optional middleware
  • ModuleMocker(import.meta.url) - Module mocking utility (see mocking patterns)
  • post(app, url, body, headers) - POST request helper
  • get(app, url, headers) - GET request helper
  • doRequest(app, url, method, body, headers) - Generic request helper
Related skills
Installs
5
GitHub Stars
35
First Seen
Mar 17, 2026