https://github.com/mcliment/typescript-karma-webpack-coverage-sample
The most basic example I can think of a Typescript project with Karma + Webpack + full coverage
https://github.com/mcliment/typescript-karma-webpack-coverage-sample
coverage istanbul karma typescript webpack
Last synced: 5 months ago
JSON representation
The most basic example I can think of a Typescript project with Karma + Webpack + full coverage
- Host: GitHub
- URL: https://github.com/mcliment/typescript-karma-webpack-coverage-sample
- Owner: mcliment
- License: mit
- Created: 2017-10-24T20:51:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-16T18:32:43.000Z (about 1 year ago)
- Last Synced: 2024-08-02T05:05:46.165Z (9 months ago)
- Topics: coverage, istanbul, karma, typescript, webpack
- Language: TypeScript
- Homepage:
- Size: 1.22 MB
- Stars: 36
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Typescript + Karma + Webpack + Coverage :sparkles:
[](https://circleci.com/gh/mcliment/typescript-karma-webpack-coverage-sample)

[](https://codecov.io/gh/mcliment/typescript-karma-webpack-coverage-sample) [](https://snyk.io/test/github/mcliment/typescript-karma-webpack-coverage-sample?targetFile=package.json)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](https://github.com/webpack-contrib/istanbul-instrumenter-loader) to generate istanbul instrumentation data for coverage
- [karma-coverage-istanbul-reporter](https://github.com/mattlewis92/karma-coverage-istanbul-reporter) to report coverage from istanbul
- [karma-webpack](https://github.com/webpack-contrib/karma-webpack) to preprocess files through Webpack