If you're building APIs with Hono and want to test them properly, this gives you the patterns to do it right. Hono's testing story is refreshingly simple: construct a Request, pass it to your app, check the Response. The skill covers both the basic app.request() API and the typed test client that gives you full inference. It also handles environment mocking for Cloudflare Workers, which is nice if you're deploying there. Works with whatever test runner you're already using. Honestly, this is the kind of testing approach more frameworks should adopt. No ceremony, just request in and response out.

skills.sh installs
422
GitHub stars
79
last updated
Aug 21, 2026

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill hono-testing --agent claude-code

Installs into .claude/skills of the current project.

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')

Sponsors

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Category
Testing & QA
First seen
Jun 3, 2026

More from bobmatnyc/claude-mpm-skills

All 158
1pproenca avatarreact-testing-librarypproenca/dot-skillsReact Testing Library best practices for writing maintainable, user-centric tests. Use when writing, reviewing, or refactoring RTL tests. Triggers on test files418skills.sh installs
2levnikolaevich avatarln-140-test-docs-creatorlevnikolaevich/claude-code-skillsCreates test documentation (testing-strategy.md, tests/README.md) with Risk-Based Testing philosophy. Use when setting up test strategy for a project.394skills.sh installs
3pmprompt avatarab-test-designerpmprompt/claude-plugin-product-managementDesign robust A/B test experiments. Use when testing a new feature, validating a hypothesis, or optimizing conversion rates.394skills.sh installs
4dawiddutoit avatarplaywright-web-scraperdawiddutoit/custom-claudeExtract structured data from multiple web pages using Playwright with built-in ethical crawling practices including rate limiting, robots.txt compliance, and er393skills.sh installs
5iserter avatarlaravel-tddiserter/laravel-claude-agentsTest-Driven Development specifically for Laravel applications using Pest PHP. Use when implementing any Laravel feature or bugfix - write the test first, watch 380skills.sh installs
6leonardomso avatartest-writerleonardomso/33-js-conceptsGenerate comprehensive Vitest tests for code examples in JavaScript concept documentation pages, following project conventions and referencing source lines356skills.sh installs