Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 days 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-16T18:32:43.000Z (8 months ago)
- Last Synced: 2024-08-02T05:05:46.165Z (3 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:
[![CircleCI](https://circleci.com/gh/mcliment/typescript-karma-webpack-coverage-sample.svg?style=svg)](https://circleci.com/gh/mcliment/typescript-karma-webpack-coverage-sample)
![Node.js CI](https://github.com/mcliment/typescript-karma-webpack-coverage-sample/workflows/Node.js%20CI/badge.svg)
[![codecov](https://codecov.io/gh/mcliment/typescript-karma-webpack-coverage-sample/branch/master/graph/badge.svg)](https://codecov.io/gh/mcliment/typescript-karma-webpack-coverage-sample) [![Known Vulnerabilities](https://snyk.io/test/github/mcliment/typescript-karma-webpack-coverage-sample/badge.svg?targetFile=package.json)](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