From 8ddfa8cd6884e7bf5e770fc8b32ea092ce8d3d08 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Nov 2013 19:13:36 -0700 Subject: [PATCH] Add `_.isEqual` tests for wrapped and unwrapped values. --- test/test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/test.js b/test/test.js index ee01d2ffd..8742f8977 100644 --- a/test/test.js +++ b/test/test.js @@ -3771,6 +3771,25 @@ } }); + test('should perform comparisons between wrapped and non-wrapped values', 4, function() { + if (!isNpm) { + var object1 = _({ 'a': 1, 'b': 2 }), + object2 = { 'a': 1, 'b': 2 }; + + strictEqual(object1.isEqual(object2), true); + strictEqual(_.isEqual(object1, object2), true); + + object1 = _({ 'a': 1, 'b': 2 }); + object2 = { 'a': 1, 'b': 1 }; + + strictEqual(object1.isEqual(object2), false); + strictEqual(_.isEqual(object1, object2), false); + } + else { + skipTest(4); + } + }); + test('should return `true` for like-objects from different documents', 1, function() { // ensure `_._object` is assigned (unassigned in Opera 10.00) if (_._object) {