/Knowledge/sources/honojs__hono/llms-full/cloudflare-workers-testing--b4f5db95f453.md
Cloudflare Workers: Testing - hono-docs
Cloudflare Workers: Testing Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt testing Summary For testin...
Cloudflare Workers: Testing
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#testing
Summary
For testing, we recommend using @cloudflare/vitest-pool-workers. Refer to examples for setting it up. If there is the application below. ```ts import { Hono } from 'hono' const app = new Hono() app...
Content
For testing, we recommend using @cloudflare/vitest-pool-workers.
Refer to examples for setting it up.
If there is the application below.
import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => c.text('Please test me!'))
We can test if it returns "200 OK" Response with this code.
describe('Test the application', () => {
it('Should return 200 response', async () => {
const res = await app.request('http://localhost/')
expect(res.status).toBe(200)
})
})
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#testing",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Cloudflare Workers > Testing",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 387,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Cloudflare Workers: Testing",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}