Open
Description
Read the following for references:
- https://www.paigeniedringhaus.com/blog/how-to-unit-test-next-js-api-routes-with-typescript
- https://nextjs.org/docs/app/guides/testing
Steps of writing tests
- PR-1 do the jest setup, and write test for a single route, submit the first PR referencing this issue. Team needs to finalize the format of organizing the tests.
- PR-2 write the pseudo code of test cases and edge cases of all routes, and get the document validated by team
- PR-3 generate test cases using the pseudo code/logic doc for all routes, and validate the code, run and validate the tests. if the routes have logical incompleteness, or unhandled edge cases, its okay for some tests to fail