Clone wiki

blockyTests / Home


blockyTests is a very light-weight javascript unit test library. BlockyTests is designed for web developers that want to test their websites but don't need/want to go through the hassle of trying to integrate javascript unit tests into their web application build process.

View the API documentation for more information.

BlockyTests features

BlockyTests is cross-browser. It runs on Safari 2/3+, Firefox 1/2/3+, Opera 8/9+, IE 6/7/8/9, Google Chrome (any).

BlockyTests has no external dependencies. Everything blockyTests needs to run is included in its 2kb release file.

BlockyTests is familiar to any developer that has done unit testing. Its syntax closely mirrors XUnit style test frameworks and its assertion functions are written in plain english.

A quick sample

Lets create a simple function that will add together each number passed to it and return the result:

function add() {
    var result = 0;
    for(var i = 0; i <= arguments.length - 1; i++ ) {
        result += arguments[i];
    return result;

Here is a blockyTest we might write for this function:

blockyTest.addTest( "one plus two is three", function() {
    this.shouldBeEqual(3, add(1,2));