H
Hono•6mo ago
JustUseFirefox

Looking for demo repo on how to implement tests

Hey there, Is there a demo repository out there that contain tests ? I'm looking for which command to put in my package.json, and some basic exemples on how to test routes, etc. Thanks!
7 Replies
Aditya Mathur
Aditya Mathur•6mo ago
You can use vitest and follow this - https://hono.dev/docs/helpers/testing
Testing Helper - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.
Aditya Mathur
Aditya Mathur•6mo ago
Testing - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.
JustUseFirefox
JustUseFirefoxOP•5mo ago
Is vitest easier than jest? (the guide refer to jest so I'm wondering)
jastornaut
jastornaut•5mo ago
Found this repo the other day. Should cover most core testing usage: https://github.com/DavidHavl/hono-rest-api-starter
GitHub
GitHub - DavidHavl/hono-rest-api-starter
Contribute to DavidHavl/hono-rest-api-starter development by creating an account on GitHub.
Aditya Mathur
Aditya Mathur•5mo ago
I prefer vitest but you can use jest too Seems like they also use vitest 😆
JustUseFirefox
JustUseFirefoxOP•5mo ago
You're an angel ! Thank you, that is exactly what I was looking for
MarvinKR
MarvinKR•2mo ago
Thank you for this thread, was going to write the same one! How are your tests going so far ?

Did you find this page helpful?