typescript-karma-webpack-coverage-sample
typescript-karma-webpack-coverage-sample copied to clipboard
The most basic example I can think of a Typescript project with Karma + Webpack + full coverage
Typescript + Karma + Webpack + Coverage :sparkles:
The most basic example I can think of a Typescript project with Webpack + Karma + full coverage
Motivation :muscle:
I tried many routes to make this work properly. Some people have enough with a coverage report from the js file generated by webpack but I wanted a better user experience and invested some time finding a good solution.
In the proposed solution, karma-typescript can be also used instead of going through the webpack route but in more complex scenarios reusing the main webpack configuration may be very convenient.
Notable packages :gift:
- istanbul-instrumenter-loader to generate istanbul instrumentation data for coverage
- karma-coverage-istanbul-reporter to report coverage from istanbul
- karma-webpack to preprocess files through Webpack