Erik A. Hanson's Weblog

Minor New Features In JsUnit 2.2alpha24

Posted: August 9th, 2007    Tags: Javascript, JsUnit, Unit Testing

I added a few new features to JsUnit and tagged it as version 2.2 alpha 24. Browse the new version at SourceForge or check it out like this:

svn co https://jsunit.svn.sf.net/svnroot/jsunit/tags/v2_2alpha24/jsunit/ jsunit

Show Log

There’s now a “Show Log” button that opens a window with a log of what JsUnit has been up to.

New Log Button

New log button (click image for larger view)

New Log Window

New log window (click image for larger view)

New URL Parameters

There are three new URL parameters:

  • suppressDialogs=true will suppress JsUnit’s dialogs in interactive mode
  • setupPageTimeout=n will change the timeout for the setupPage call
  • pageLoadTimeout=n will change the page load timeout

Easier Suite Creation

The jsUnitTestSuite constructor now accepts test pages and subsuites as parameters. So instead of this:

function suite() {
  var suite = new jsUnitTestSuite();
  suite.addTestPage("/foo/barTest.html");
  suite.addTestPage("/foo/bazTest.html");
  return suite;
}

you can do this:

function suite() {
  return new jsUnitTestSuite("/foo/barTest.html", "/foo/bazTest.html");
}


Leave a Reply



(Comments are moderated to keep out spam. Please be patient.)