script.aculo.us provides a complete set of classes and methods for Java Script UnitTesting.
To use UnitTesting, you must include unittest.js in your HTML file. See Test.Unit.Runner for a complete example on how this works.
script.aculo.us includes unit and functional tests for itself, inside the test folder of the SVN trunk. Note that as of August 2005 some of the tests will fails in browsers other than Firefox (due to implementation differences and some of the DOM functions used not implemented in some browsers).
(todo)
A short tutorial (second half of the page) demonstrating the use of the script.aculo.us test harness for your own Java Script code, prepared for the Linux Users Group, Villafranca, Verona, Italy.