- Changed the signature of functions passed to
output()and friends to accept a single argument rather than a list of arguments. This allows custom functions to be much simpler.
- Added support for Macromedia Director. Patch from Gordon McCreight.
- Backwards Incompatibility change: moved all
namespaceby using an object for the Test namespace and assigning the
Build()constructor to it. See http://xrl.us/fy4h for a description of this approach.
- Fixed the
typeOf()class method in Test.Builder to just return the value returned by the
typeofoperator if the class constructor is an anonymous function.
for (var in in someArray)to
for (var i = 0; i < someArray.length; i++)for iterating through arrays, since the former method will break if someone has changed the prototype for arrays. Thanks to Bob Ippolito for the spot!
- The default output in browsers is now to append to an element with the
testor, failing that, to use
document.write. The use of the
testelement allows output to continue to be written to the browser window even after the document has been closed. Reported by Adam Kennedy.
- Changed the default
endOutput()method to be the same as the other outputs.
- Backwards incompatibility change: Changed semantics
plan()so that it takes an object for an argument. This allows multiple commands to be passed, where the object attribute keys are the command and their values are the arguments.
- Backwards incompatibility change: Changed
no_diag(in Test.More only) options to
plan()to their studlyCap alternatives,
endAsync()methods to Test.Builder to allow users to put off the ending of a script until after asynchronous tests have been run. Suggested by Adam Kennedy.
- Backwards incompatibility change: Changed the signature for the
output()method and friends to take only a single anonymous function as its argument. If you still need to call a method, pass an anonymous function that calls it appropriately.
- Changed handling of line-endings to be browser-specific. That is, if the
current environment is Internet Explorer, we use
\rfor line endings. Otherwise we use
\n. Although IE properly interprets \n as a line ending when it's passed to
document.write(), it doesn't when passed to a DOM text node. No idea why not.
- Added a browser harness. Now you can run all of your tests in a single browser window and get a summary at the end, including a list of failed tests and the time spent running the tests.
- Fixed calls to
- Output to the browser now causes the window to scroll when the length of the output is greater than the height of the window.
- Backwards incompatibility change: Changed all instances of
OK. So this means that the new Test.More function names are
cmpOK(). Sorry 'bout that, won't happen again.
- Ported to Safari (though there are issues--see the
Bugssection of the Test.Harness.Browser docs for details).
Obviously this is a big release. I bumped up the version number because there are a fair number of backwards incompatibilities. But I'm reasonably confident that they wont' change so much in the future. And with the addition of the harness, it's getting ready for prime time!
Next up, I'll finish porting the test from Test::Harness (really!) and add support for JSAN (look for a JSAN announcement soon). But in the meantime, feedback, bug reports, kudos, complaints, etc.warmly welcomed!