Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

webpack-contrib/coverjs-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

coverjs loader module for webpack - UNMAINTAINED

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published