The docs currently contain zero informations about testing. I am moving my backend from Nuxt to a separate Nitro app especially to have better testing abilities (Nuxt test utils need 15s to prepare tests).
Further I would suggest that Nitro provides more features/support for writing tests. E.g. an automatic bootstrap/setup of the Nitro app would be great as well as fetch function for internal routes and the possibility of mocking.
Additional information
[ ] Would you be willing to help implement this feature?
For the time being, you can use nitro-test-utils, which is built upon Vitest and has a similar API to Nuxt with a $fetch method to check the body of Nitro routes.
Describe the feature
The docs currently contain zero informations about testing. I am moving my backend from Nuxt to a separate Nitro app especially to have better testing abilities (Nuxt test utils need 15s to prepare tests).
I wonder if there are even any testing utilities for Nitro to support running partial tests and have HMR? Open discussion: https://github.com/unjs/nitro/discussions/194
For comparison, here are the test docs from some other huge api frameworks which are very detailed:
Further I would suggest that Nitro provides more features/support for writing tests. E.g. an automatic bootstrap/setup of the Nitro app would be great as well as fetch function for internal routes and the possibility of mocking.
Additional information