My favorites | Sign in
Project Home Downloads Wiki Issues
Project Information
Members
Featured
Downloads
Wiki pages
Links

jstest is a lightweight unit testing library for javascript. Here's an example:

var task;

jstest("Testing the gearquery module", {
    setup: function(){
        task = gearquery("task", {});
    },

    testExists: function(){
        assert(task, "should not be null");
    },

    testUpdate: function(){
        task.update({name: "Test"}, {where: "id = 2"});
        var name = task.get({id: 2}).name;
        assert(name == "Test");
    }
});

jstest is still currently in alpha mode. I've been using it in Firefox 2.5 and Safari 3 so far, but haven't tested it under IE6 or IE7 yet.

If you run into any bugs or want to give some feedback please email me at hugh (at) hughbien (dot) com.

Powered by Google Project Hosting