blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
136 stars 18 forks source link

Increase unit test coverage > 90% #122

Open blomqma opened 7 months ago

blomqma commented 7 months ago

With some recent changes, most of the logic is now performed by the CLI commands generate and validate that lowered the test coverage significantly. These commands are unfortunately not unit tested very broadly at the moment. To address this, it would be good to have unit tests for most of the functions in: https://github.com/blomqma/next-rest-framework/tree/main/packages/next-rest-framework/src/cli

There is already a solid unit testing framework and conventions set in the tests directory that could be extended: https://github.com/blomqma/next-rest-framework/tree/main/packages/next-rest-framework/tests

Note that the desired coverage doesn't need to be reached in one go, any incremental improvement to this is appreciated!

How to run tests?