Code coverage is accomplished with Jest thanks to babel-plugin-istanbul
. It transforms your code to "instrument" it for coverage. When your tests are finished, Jest reads the coverage data to generate the coverage report.
Reviewing code that has been instrumented for coverage can help understanding how coverage works and how to interpret coverage reports.