_.isEqual: Ensure that 0 and -0 are not equivalent. NaN values should be equal.

This commit is contained in:
Kit Goncharov
2011-07-12 22:16:12 -06:00
parent 9d0b43221a
commit cf812e77bc
2 changed files with 7 additions and 7 deletions

View File

@@ -73,7 +73,7 @@ $(document).ready(function() {
ok(!_.isEqual(5, NaN), '5 is not equal to NaN');
ok(NaN != NaN, 'NaN is not equal to NaN (native equality)');
ok(NaN !== NaN, 'NaN is not equal to NaN (native identity)');
ok(!_.isEqual(NaN, NaN), 'NaN is not equal to NaN');
ok(_.isEqual(NaN, NaN), 'NaN is equal to NaN');
ok(_.isEqual(new Date(100), new Date(100)), 'identical dates are equal');
ok(_.isEqual((/hello/ig), (/hello/ig)), 'identical regexes are equal');
ok(!_.isEqual(null, [1]), 'a falsy is never equal to a truthy');