Skip to content

Commit

Permalink
Test _.isEqual crawls symbol properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Nov 24, 2016
1 parent 783e03f commit 40a591d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test.js
Expand Up @@ -10114,14 +10114,15 @@
var object1 = { 'a': 1 },
object2 = { 'a': 1 };

object1[symbol] = object2[symbol] = 2;
object1[symbol] = { 'a': { 'b': 2 } };
object2[symbol] = { 'a': { 'b': 2 } };
assert.strictEqual(_.isEqual(object1, object2), true);

object2[symbol] = 3;
object2[symbol] = { 'a': 1 };
assert.strictEqual(_.isEqual(object1, object2), false);

delete object2[symbol];
object2[Symbol('a')] = 2;
object2[Symbol('a')] = { 'a': { 'b': 2 } };
assert.strictEqual(_.isEqual(object1, object2), false);
}
else {
Expand Down

0 comments on commit 40a591d

Please sign in to comment.