coverjs loader for webpack
Usage
webpack-dev-server "mocha!./cover-my-client-tests.js" --options webpackOptionsjs
// webpackOptions.jsmoduleexports =// your webpack optionsoutput: "bundle.js"publicPrefix: "/"debug: trueincludeFilenames: truewatch: true// the coverjs loader bindingpostLoaders:test: "" // every fileexclude:"node_modules.chai""node_modules.coverjs-loader""node_modules.webpack.buildin"loader: "coverjs-loader"
// cover-my-client-tests.js;;
See the-big-test for an example.
You don't have to combine it with the mocha loader, it's independent. So if you want to cover a normal app usage, you can do so. The reportHtml
function just appends the output to the body.
License
MIT (http://www.opensource.org/licenses/mit-license.php)