JS-Test-Simple
view release on metacpan or search on metacpan
- Fixed plan() so that it doesn't die if the object is passed with an
unknown attribute. This can happen when JS code has altered
Object.prototype. Reported by Rob Kinyon.
- Fixed some errors in the POD documentation.
- Updated JSAN to 0.10.
- Added documentation for Test.Harness.Director, complements of
Gordon McCreight.
- Fixed line endings in Konqueror and Opera and any other browser
other than MSIE that supports document.all. Reported by Rob Kinyon.
- Added support to Test.Harness.Browser for .js test files in addition
to .html test files. Thanks to Pawel Chmielowski for helping me to
overcome the final obstacles to actually getting this feature to work.
- Added missing variable declarations. Patch from Pawel Chmielowski.
- More portable fetching of the "body" element in Test.Builder.
Based on patch from Pawel Chmielowski.
- Added an "encoding" attribute to Test.Harness. This is largely to
support pure JS tests, so that the browser harness can set up the
proper encoding for the "script" elements it creates.
- Added support for Opera, with thanks to Pawel Chmielowski.
- Fixed the output from skipAll in the test harness.
- Fixed display of summary of failed tests after all tests have been run
by the browser harness. They are now displayed in a nicely formatted
table without a "NaN" stuck where it doesn't belong.
- COMPATIBILITY CHANGE: The browser harness now outputs failure
information bold-faced and red. This required changing the "output"
argument to the outputResults() method to an object with two methods,
pass() and fail(). Anyone using Test.Harness.outputResults() will want
to make any changes accordingly.
- COMPATIBILITY CHANGE: new Test.Builder() now always returns a new
Test.Builder object instead of a singleton. If you want the singleton,
call Test.Builder.instance(). Test.Builder.create() has been
deprecated and will be removed in a future release. This is different
from how Perl's Test::Builder works, but is more JavaScript-like and
sensible, so we felt it was best to break things early on rather than
later. Suggested by Bob Ippolito.
- Added beginAsync() and endAsync() functions to Test.More. Suggested by
Bob Ippolito.
0.11 2005-07-06T02:51:16
- The browser harness now works more reliably in IE and Safari.
- Fixed syntax errors in tests/harness.html that IE and Safari care
about.
- Various tweaks for Director compatibility from Gordon McCreight.
- Removed debugging output from Test.More.canOK().
- Fixed default output so that it doesn't re-open a closed browser
document when there is a "test" element.
- Added experimental Test.Harness.Director, complements of Gordon
McCreight. This harness is subject to change.
- Added Test.PLATFORM, containing a string defining the platform. At
the moment, the only platforms listed are "browser" or "director".
- Added support for Casey West's JSAN (http://www.openjsan.org). All
releases of Test.Simple will be on OpenJSAN from now on.
- The iframe in the browser harness is no longer visible in IE. Thanks
to Marshall Roch for the patch.
- Noted addition of Test.Harness and Test.Harness.Browser in the README.
0.10 2005-06-24T04:30:24
- 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 "modules" into Test
"namespace" by 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 "typeof" operator if the class constructor is an
anonymous function.
- Changed "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
ID "test" or, failing that, to use "document.write". The use of the
"test" element 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 of 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 the "no_plan", "skip_all",
and "no_diag" (in Test.More only) options to plan() to their studlyCap
alternatives, "noPlan", "skipAll", and "noDiag". This makes them
consistent with JavaScript attribute naming convention.
- Added beginAsync() and 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 \r for 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 warn() in Test.More.
- 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" to
"OK". So this means that the new Test.More function names are
"canOK()", "isaOK()", and "cmpOK()". Sorry 'bout that, won't happen
again.
- Ported to Safari (though there are issues--see the "Bugs" section
of the Test.Harness.Browser docs for details).
0.03 2005-04-29T18:03:18
- Removed trailing commas from 3 arrays, since IE6/Win doesn't like
them. And now everything works in IE. Thanks to Marshall Roch for
tracking down and nailing this problem.
- isNum() and isntNum() in TestBuilder.js now properly convert values
to numbers using the global Number() function.
- CurrentTest is now properly initialized to 0 when creating a new
TestBuilder object.
- Values passed to like() and unlike() that are not strings now
( run in 0.528 second using v1.01-cache-2.11-cpan-13bb782fe5a )