coverjs-loader
coverjs loader module for webpack
Last updated 8 years ago by sokra .
MIT · Original npm · Tarball · package.json
$ cnpm install coverjs-loader 
SYNC missed versions from official npm registry.

coverjs loader for webpack

Usage

webpack-dev-server "mocha!./cover-my-client-tests.js" --options webpackOptions.js
// webpackOptions.js
module.exports = {
	// your webpack options
	output: "bundle.js",
	publicPrefix: "/",
	debug: true,
	includeFilenames: true,
	watch: true,

	// the coverjs loader binding
	postLoaders: [{
		test: "", // every file
		exclude: [
			"node_modules.chai",
			"node_modules.coverjs-loader",
			"node_modules.webpack.buildin"
		],
		loader: "coverjs-loader"
	}]
}
// cover-my-client-tests.js
require("./my-client-tests");

after(function() {
	require("cover-loader").reportHtml();
});

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)

Current Tags

  • 0.5.0                                ...           latest (8 years ago)

3 Versions

  • 0.5.0                                ...           8 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |