version 2.2, in jsUnitCore.js, assertObjectEquals(date1, date2) failed to compare two equivalent Date objects.
The cause is in the same file,
JsUnit.PRIMITIVE_EQUALITY_PREDICATES
A quick solution follows.
- Add the following:
JsUnit.DATE_EQUALITY_PREDICATE = function(var1, var2) {
return var1.valueOf() === var2.valueOf();
};
- Modify the following line
'Date': JsUnit.TRIPLE_EQUALITY_PREDICATE,
to the following line
'Date': JsUnit.DATE_EQUALITY_PREDICATE,
Please review the solution.