Socket
Socket
Sign inDemoInstall

coverjs-loader

Package Overview
Dependencies
14
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    coverjs-loader

coverjs loader module for webpack


Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Install size
4.95 MB
Created
Weekly downloads
 

Readme

Source

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)

FAQs

Last updated on 01 Feb 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc