From 0d6279617b8a6c26da4bc0be15531fc1d5248345 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 1 Sep 2014 16:03:22 -0700 Subject: [PATCH] Add `_.isEqual` tests for arrays and objects from different documents. --- test/test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/test.js b/test/test.js index a59029fa8..526369826 100644 --- a/test/test.js +++ b/test/test.js @@ -5829,14 +5829,16 @@ } }); - test('should return `true` for like-objects from different documents', 1, function() { + test('should return `true` for like-objects from different documents', 4, function() { // ensure `_._object` is assigned (unassigned in Opera 10.00) if (_._object) { - var object = { 'a': 1, 'b': 2, 'c': 3 }; - strictEqual(_.isEqual(object, _._object), true); + strictEqual(_.isEqual({ 'a': 1, 'b': 2, 'c': 3 }, _._object), true); + strictEqual(_.isEqual({ 'a': 1, 'b': 2, 'c': 2 }, _._object), false); + strictEqual(_.isEqual([1, 2, 3], _._array), true); + strictEqual(_.isEqual([1, 2, 2], _._array), false); } else { - skipTest(); + skipTest(4); } });