Add Code Coverage to tests in a Webpack project

Kent C. Dodds
InstructorKent C. Dodds

Share this video with your friends

Send Tweet

How much of your code runs during unit testing is an extremely valuable metric to track. Utilizing code the karma-coverage plugin and babel-plugin-__coverage__ plugin, we can get an accurate measure of how well we’re covering the files that we are testing.

Marcos Hernandez
Marcos Hernandez
~ 4 years ago

I can't get the coverage to run the files. I get 100% coverage on 0 files. Using the same webpack config, .babelrc and karma config (the same result using babel-plugin-coverage and babel-plugin-istanbul