next-rest-framework
next-rest-framework copied to clipboard
Increase unit test coverage > 90%
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?
- Install dependencies:
pnpm i
- Run the tests from the root directory or the
./packages/next-rest-framework
directory:pnpm test