npx vratix init
Our API modules come with pre-written tests for controllers and middleware, making it easy to ensure your service functions as expected. We have included the test coverage for each module in the documentation.
Setup
Make sure to configure .env
variables in your vitest.config.ts
file so the tests can run. You can use mock values.
Running Tests
To execute tests, run the following command from the root of your project:
Coverage Report
To generate a test coverage report, use:
This command will create a detailed report, allowing you to identify which parts of your code are covered by tests.