API testing in Nitro
I wrote a standalone backend in
nitro
. Now I am trying to write tests using vitest
. I am able to test simple utils just fine. But when it comes to testing apis. I am stuck. I can't find a good solution. I tried using supertest
but failed.
If anyone has ever written api tests for nitro server. Please guide. π2 Replies
look at how unjs maintainer test nitro to steal some idea
https://github.com/unjs/nitro/blob/v2/test/tests.ts
GitHub
nitro/test/tests.ts at v2 Β· unjs/nitro
Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer. - unjs/nitro
Hey man thanks β¨