Testing/testharness.js Improvements

From W3C Wiki

These are suggestions to improve testharness.js to make it more appealing to developers used to working with Jasmine, qUnit, etc.

  • More JS-y API (camelcase rather than underscore.) Keep previous API for backwards comp. e.g.:
   asyncTest(function(t) {
       object.someevent = function() {
           t.step(function (){assertTrue(true); t.done();});
       };
   }, "Simple async test");
   
  • More conventional order of args (again, keep previous API for backwards compat):
   asyncTest("Simple async test", function(t) {
       object.someevent = function() {
           t.step(function (){assertTrue(true); t.done();});
       };
   });
  • Tests (apparently there are issues in some of the assertion methods)
  • Nicer rendering of results.
  • Documentation out of the src code and into the resource center.