- Notifications
You must be signed in to change notification settings - Fork9
Istanbul code coverage loader for Webpack
License
JS-DevTools/coverage-istanbul-loader
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is aWebpack loader that usesIstanbul to add code coverage instrumentation to your code. This is especially useful for in-browser testing, in a tool likeKarma, where you can usekarma-coverage-istanbul-reporter to output code coverage data in a variety of formats that are supported by services likeCoveralls orCodacy.
Coverage Istanbul Loader is based onIstanbul Instrumenter Loader, but uses a newer version of theIstanbul API and has better support for source maps.
Seethe examples folder for usage examples for various use cases.
"hello, world" example
This is the most simplistic example. It just uses coverage-istanbul-loader with its default options to produce an output bundle that contains code coverage instrumentation.TypeScript example
This example demonstrates using coverage-istanbul-loader with transpiled code. It correctly maps the instrumented JavaScript code back to the original TypeScript source code.Karma example
This example demonstrates using coverage-istanbul-loader withKarma andkarma-coverage-istanbul-reporter to produce code coverage reports for browser tests.Example with options
This example demonstrates passing options to coverage-istanbul-loader. The options are passed-on toistanbul-lib-instrument, soall the same options are supported.
Contributions, enhancements, and bug-fixes are welcome!Open an issue on GitHub andsubmit a pull request.
To build/test the project locally on your computer:
Clone this repo
git clone https://github.com/JS-DevTools/coverage-istanbul-loader.gitInstall dependencies
npm installBuild the code
npm run buildRun the tests
npm test
coverage-istanbul-loader is 100% free and open-source, under theMIT license. Use it however you want.
This package isTreeware. If you use it in production, then we ask that youbuy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
Thanks to these awesome companies for their support of Open Source developers ❤
About
Istanbul code coverage loader for Webpack
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.