Question 8 of 10Pro Only
What is code coverage in testing? How do you generate and interpret a coverage report with Jest?
Sample answer preview
Code coverage measures what proportion of your code is executed by your tests. It is a useful but insufficient indicator of test quality. To generate a coverage report, run npm test with the coverage flag. Or add a script in package.json with jest and the coverage flag.
coveragestatementsbranchesfunctionslinescoverageThreshold