Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

82 lines (41 sloc) 3.494 kB

Compatibility and Features

Browser Testing

A classic example of browser testing with blanket coverage can be found in /test/lib-tests. This is blanket covering the blanket code (eating our own dog food).

Blanket can be run in any modern browser (Chrome, FF, Safari, IE9+), but will fail in IE8 or lower. You may need to use es5-shim to get it working in those environments. If you feel Blanket should support IE8, please let me know in the Issue Tracker.

Node testing

Node testing can be seen in /test/test-node. These are blanket's own node based tests.

RequireJS

If you already use RequireJS in your test runner, it's no problem, blanket will work around it. See an example in /test/requirejs

Mocha in the browser

Mocha can be run in the browser, and blanket seamlessly integrates with it. All you need to do is reference the mocha adapter when you reference the blanket script, and the rest is done for you.

Check out an example in /test/mocha-browser

Jasmine

Blanket comes with QUnit support by default, but Jasmine (or any other test runner) can be supported using an adapter (or a custom build!).

An example of Jasmine support can be seen in /test/jasmine

Backbone

Backbone, or any external library, doesn't have any effect on blanket. The Backbone Koans test suite (by Addy Osmani) illustrates the compatibility.

CoffeeScript in the browser

If your test runner tests source files written in coffee script, blanket still has you covered. Using a custom loader, coffeescript files are compiled, instrumented, and tested.

See coffeescript support in /test/coffee_script

CoffeeScript in node

If your mocha tests use coffee script source files, blanket still has you covered.

See an example in /test/test-node/

Custom Reporter

You can easily create your own reporters for blanket. See a frivolously simple example in /test/custom-reporter

Branch Tracking

Blanket can track untouched branches. You can view a simple example in /test/branchTracking

How much jQuery does Bootstrap use?

You can cover dependencies of your source files to see what percentage of a certain library you use.

You can see this in action by viewing /test/bootstrap and seeing that Twitter Bootstrap uses almost 50% of jQuery code!

Jump to Line
Something went wrong with that request. Please try again.