Sometimes, we want to get the code coverage report using Jest.
In this article, we’ll look at how to get the code coverage report using Jest.
How to get the code coverage report using Jest?
To get the code coverage report using Jest, we run jest
with the coverage
option.
For instance, we run
npx jest --coverage
to run Jests tests and generate a code coverage report after that.
Conclusion
To get the code coverage report using Jest, we run jest
with the coverage
option.