jscoverage

0.3.0-beta1 • Public • Published

jscoverage

jscoverage tool, both node or javascript support

install

npm install jscoverage -g

using as cli command

jscoverage
# print help info
jscoverage source.js
# convert source.js to source-cov.js
jscoverage source.js dest.js
# convert source.js to dest.js
jscoverage sourcedir destdir --exclude a.js,b.js,c.js
# convert all files in sourcedir to destdir, exclude list will be ignored

using as node module

var jsc = require('jscoverage');
var abc = jsc.require(module, 'testmodule.js');
describe('test', function () {
    // TEST CODE HERE
});

==== or =====

var jsc = require('jscoverage');
require = jsc.mock(mo);
var abc = require('abc.js', true);
describe('test', function () {
    // TEST CODE HERE
});

dependence

uglify-js

thanks

piuccio/node-coverage https://github.com/piuccio/node-coverage

Package Sidebar

Install

npm i jscoverage@0.3.0-beta1

Version

0.3.0-beta1

License

MIT

Last publish

Collaborators

  • kate.sf
  • fish
  • sunfang1cn
  • fishbar