alex-seville/blanket
alex-seville/blanket has 1,394 GitHub stars and 164 forks. GitHot measured 0 in 7 days. Last checked 2026-11-10 04:38 UTC. Last push 2022-12-06.
blanket.js is a simple code coverage library for javascript. Designed to be easy to install and use, for both browser and nodejs.
Measured star growth
- in 24h
- Update delayed
- in 7 days
- 0
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalBlanket.js
A seamless JavaScript code coverage library.
FYI: Please note that this repo is not actively maintained
If you're looking for a more active project for JavaScript code coverage, I recommend Istanbul.
Project home page
Blanket_js on Twitter for updates and news.
NOTE: All Pull-Requests must be made into the master branch.
- Getting Started
- Philosophy
- Mechanism
- Grunt Integration
- Compatibility & Features List
- Roll Your Own
- Development
- Contact
- Contributors
- Revision History
NOTE: Blanket.js will throw XHR cross domain errors if run with the file:// protocol. See Special Features Guide for more details and workarounds.
Getting Started
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)
- Special Features Guide
Node
- Getting Started (basic mocha setup)
- Intermediate (mocha testrunner, travis-ci reporter)
- Intermediate 2 (mocha, htmlcov, package.json setup)
Configuration
- Options (Browser and Node)
Philosophy
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.
Mechanism
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
- 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.
Grunt Integration
You've got a few options for using Grunt with Blanket:
grunt-blanket
A Grunt plugin has been created to allow you to use Blanket like a "traditional" code coverage tool (creating instrumented copies of physical files, as opposed to live-instrumenting). The plugin runs as a standlone project and can be found here.
grunt-blanket-qunit
Runs the QUnit-based Blanket report headlessly using PhantomJS. Results are displayed on the console, and the task will cause Grunt to fail if any of your configured coverage thresholds are not met. Minimum code coverage thresholds can be configured per-file, per-module, and globally.
See:
Compatibility and Features List
See the Compatiblity and Feature List including links to working examples.
Roll your own
git clone [email protected]:alex-seville/blanket.gitnpm install- Add your custom build details to the grunt.js file under
concat npm run build
A minified and unminfied copy of the source can be created (see the min task).
Development
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
Contact
Feel free to add questions to the Issue tracker, or send them to @blanket_js.
Contributors
Thanks to the many people who have contributed to the project.
And thanks also to: RequireJS, Esprima, node-falafel, Mocha, Qunit.
Revision History
Feb 18-15 - 1.2.2 PR's merged, but this project is not actively maintained.
May 1-13 - 1.1.4
Loaded reverting for grunt-blanket, branch tracking reporter fixed, coverage on-the-go (displaying coverage results while a single page is being used).
Apr 28-13 - 1.1.3 YUI support added with custom adapter (and some wrapping code). CompoundJS support appears to be outside the scope of project.
... (see full revision history)
License
Copyright (c) 2012-2013 Alex Seville
Licensed under the MIT license.
Explore related projects
affaan-m/ECC
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
301,279 starsNousResearch/hermes-agent
The agent that grows with you
262,699 starsmultica-ai/andrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
232,181 starsfirecrawl/firecrawl
Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
200,444 stars