Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
jscoverage
Advanced tools
a javascript coverage tool, can be used in node dev, and browser side js dev
jscoverage tool, both node.js or javascript support
npm install jscoverage
from v0.5.0, jscoverage start using uglify2, and enhance the coverage range. now, jscoverage will find out which branch you missed!
using mocha loading the jscoverage module, then it's work:
mocha -r jscoverage test/
jscoverage will append coverage info when you select list
or spec
or tap
reporter in mocha
mocha -r jscoverage -R spec test/
besides, you can use --covout
to specify the reporter, like html
, detail
.
the detail
reporter will print the uncovered code in the console directly.
full modelł:
mocha -r jscoverage --covignore .covignore --covout=html --covinject=true --coverage=90,85,75 test
the cmd above means:
jscoverage can recognise all options below:
--covignore [filepath] # like gitignore, tell jscoverage to ignore these files
--overrideIgnore [boolean] # set if override the build-in ignore rules
--covout [output report] # can be: spec, list, tap, detail, html
--coverage [high,middle,low] # coverage level, default is: 90,70,30 , means 90% is high, 30% is low
--covinject [boolean] # switch if inject code for easytest(exports._get, exports._replace, exports._reset)
default jscoverage will search .covignore in the project root
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,*.min.js
# convert all files in sourcedir to destdir, exclude list will be ignored
jscoverage will copy exclude file from source dir to dest dir
var testMod = require('module/for/test.js');
testMod._get('name');
testMod._replace('name', value);
testMod._reset();
testMod._call();
using bellow comment, jscoverage will ignore the following block/statement
/* @covignore */
comming soon
The follow object will be detected, all of them are created by jscoverage.
FAQs
a javascript coverage tool, can be used in node dev, and browser side js dev
The npm package jscoverage receives a total of 6,403 weekly downloads. As such, jscoverage popularity was classified as popular.
We found that jscoverage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.