Hono Testing
Testing patterns for Hono apps covering app.request(), the typed test client, and environment mocking.
- CCM score
- 59 of 100
- skills.sh installs
- 433
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers request-based unit tests with
app.request(), typed client calls viatestClient, and validation error assertions - Includes GET, POST JSON, form data, and DELETE request examples, plus Cloudflare Workers binding mocks for D1, KV, and env values
- Shows Miniflare setup for running tests against realistic Workers bindings instead of hand-built mocks
- Designed for developers writing Vitest or Jest suites for Hono route handlers, middleware, and integration tests
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill hono-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Hono Testing Patterns
Overview
Hono provides a simple testing approach: create a Request, pass it to your app, and validate the Response. The framework includes a typed test client for even better DX.
Key Features:
- Simple
app.request()API - Typed test client with full inference
- Environment mocking for Workers
- Works with Vitest, Jest, or any test runner
When to Use This Skill
Use Hono testing when:
- Writing unit tests for route handlers
- Integration testing API endpoints
- Testing middleware behavior
- Mocking Cloudflare Workers bindings
- Validating request/response cycles
Basic Testing
Using app.request()
import { Hono } from 'hono'
import { describe, it, expect } from 'vitest'
const app = new Hono()
app.get('/hello', (c) => c.text('Hello!'))
app.get('/json', (c) => c.json({ message: 'Hello' }))
describe('Basic routes', () => {
it('should return text', async () => {
const res = await app.request('/hello')
expect(res.status).toBe(200)
expect(await res.text()).toBe('Hello!')
})
it('should return JSON', async () => {
const res = await app.request('/json')
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Testing & QA, Backend & APIs
- First seen
- Jun 3, 2026
Questions
How do I test Hono routes without starting a server?
The hono-testing skill covers app.request(), which passes a Request straight to your Hono app and lets you check the Response. It also shows a typed test client from hono/testing for calling routes with full type inference.
Can hono-testing mock Cloudflare Workers bindings like D1 and KV?
Yes, the skill shows how to pass mock bindings such as a D1 database, a KV namespace and an API key as the environment argument to app.request(). It also shows using Miniflare for more realistic Workers testing with real bindings.
How do I install the hono-testing skill?
Run npx -y skills add bobmatnyc/claude-mpm-skills --skill hono-testing -y in your project. The agent can then write Vitest or Jest tests for Hono route handlers, validation and middleware.
Where does hono-testing stand in the Testing & QA category?
hono-testing is listed in the Testing & QA category on Claude Marketplaces, alongside tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. It is narrower than those, focused only on testing Hono APIs.
More from bobmatnyc/claude-mpm-skills
All 154- Golang Concurrency Patterns429
- Hono Validation429
- Digitalocean Overview428
- Digitalocean Networking425
- Openrouter424
- Digitalocean Storage423
- Golang Database Patterns423
- Shadcn Ui421
- Digitalocean Managed Databases413
- Test Driven Development412
- Verification Before Completion410
- Better Auth Authentication408
- Kubernetes407
- Kysely407
- Json Data Handling404
- Systematic Debugging402
- Api Documentation400
- Vue400
- Screenshot399
- Software Patterns392
- Nextjs V16391
- Root Cause Tracing391
- Testing Anti Patterns390
- Vercel Deployments Builds388
Similar to Hono Testing
More Testing & QAhono-validationbobmatnyc/claude-mpm-skills429 installsType-safe request validation for Hono using Zod, TypeBox, Valibot, or any Standard Schema library.
nestjs-testing-expertshipshitdev/library623 installsTest-strategy guide for NestJS modules, providers, controllers, and HTTP endpoints using Vitest.
vitest-testing-patternscuriositech/some_claude_skills376 installsPractical test-writing guide for Vitest and React Testing Library covering API routes, components, utilities, and mocking patterns.
hono-rpcbobmatnyc/claude-mpm-skills462 installsType-safe Hono API client that infers routes, inputs, and response types from the server's exported AppType.