javascript - Blanket.js vs Istanbul-js vs JSCover -
i trying decide on js test code coverage tool cannot see differences between them. top hits in google blanket.js, istanbul-js , jscover.
can offer information on key differences between them , advantages/disadvantages?
are there other useful ones out there?
after trying around find istanbul convenient tool bring coverage analysis node-js project.
- its installed npm install
- it sets behavior via .istanbul.yml
- gets invoked own executable
- it provides multiple report formats such clover, lcov, jscoverage, etc.
istanbul uses provided executable or js-script perform tests , collect coverage information. can installed via npm:
npm install istanbul mocha
after successful installation invoke
./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha
respect '_' since mocha forks _mocha
-executable stated here
blanket.js nodejs integrates
- its installed npm install
- configuring behavior via package.json
- getting invoked mocha requiring blanket @ commandline
- generating statistics interpreted mocha's reporters, i.e. html-cov
- can used in browser js
basically ready use after doing
npm install blanket mocha
after successful installation run mocha tests that
./node_modules/.bin/mocha --require blanket --reporter html-cov >coverage.html
unfortunately have invoke mocha tests twice if want collect coverage information collect test reports since can provide 1 reporter mocha.
i can not jscover since installation complicated me. important me not have install packages root or compile things since becomes more complicated other users create development environment.
Comments
Post a Comment