A seamless JavaScript code coverage library.
- Getting Started
- Philosophy
- Mechanism
- Roll Your Own
- Development
- Contact
- Contributors
- Revision History
Please see the following guides for using Blanket.js:
Browser
- Getting Started (Basic QUnit usage)
- Intermediate (Other test runners, global options)
- Advanced (writing your own reporters/adapters)
Node
- Getting Started (basic mocha setup)
- Intermediate (mocha testrunner, travis-ci reporter)
Blanket.js is a code coverage tool for javascript that aims to be:
- Easy to install
- Easy to use
- Easy to understand
Blanket.js can be run seamlessly or can be customized for your needs.
JavaScript code coverage compliments your existing JavaScript tests by adding code coverage statistics (which lines of your source code are covered by your tests).
Blanket works in a 3 step process:
- Loading your source files using a modified RequireJS/Require script
- Parsing the code using Esprima and node-falafel, and instrumenting the file by adding code tracking lines.
- Connecting to hooks in the test runner to output the coverage details after the tests have completed.
git clone git@github.com:Migrii/blanket.git
npm install
- Add your custom build details to the grunt.js file under
concat
grunt buildit
A minified and unminfied copy of the source can be created (see the min
task).
All development takes place on the MASTER branch.
Your pull request must pass all tests (run npm test
to be sure) and respect all existing coverage thresholds
If you're looking for a place to contribute, the 'low priority' issues are probably a good introduction to the project.
Feel free to add questions to the Issue tracker, or send them to @alex_seville.
Thanks to the following people:
And thanks also to: RequireJS, Esprima, node-falafel, Mocha, Qunit.
Dec 14-12 - 1.0.0 Added to Bower, fixed relative paths issues, added noConflict, refactored core code, added Twitter Bootstrap example.
Dec-8-12 - 0.9.9 Moved Makefile into grunt and reorganized files. Fixed instrumenting of comments in node.
Dec-3-12 - 0.9.8 Fixes to instrumentation, fix for escaped characters in node. Added adapters and Jasmine example.
Nov-26-12 - 0.9.7 Custom reporters. Better organization of tests.
Nov-24-12 - 0.9.6 Better line counts, more tests, normalizing slashes for windows, require loader uses module._compile to properly pass the exports, added Makefile for CI, various other fixes.
Nov-19-12 - 0.9.4 Major refactoring, QUnit tests run with phantomjs, both node and browser tests are covered by blanket on travis-ci. Compatibility with existing requirejs instance.
Nov-8-12 - 0.9.2 Bug fixes to instrumentation and node require loader.
Nov-4-12 - 0.9.1 Works seamlessly with mocha (in node) and uses built in mocha reporters for coverage.
Oct-29-12 - 0.9.0 Initial release of blanket.js. Works with qunit, but coverage output is not complete.
Copyright (c) 2012 Alex-Seville
Licensed under the MIT license.