Skip to content

Commit

Permalink
Test tricky object comparisions
Browse files Browse the repository at this point in the history
  • Loading branch information
megawac committed May 15, 2015
1 parent 99fd23e commit 4e2d94d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,13 @@

var other = {a: 1};
strictEqual(_.isEqual(new Foo, other), false, 'Objects from different constructors are not equal');


// Tricky object cases val comparisions
equal(_.isEqual([0], [-0]), false);
equal(_.isEqual({a: 0}, {a: -0}), false);
equal(_.isEqual([NaN], [NaN]), true);
equal(_.isEqual({a: NaN}, {a: NaN}), true);
});

test('isEmpty', function() {
Expand Down

0 comments on commit 4e2d94d

Please sign in to comment.