Add _.isEqual tests for arrays and objects from different documents.

This commit is contained in:
John-David Dalton
2014-09-01 16:03:22 -07:00
parent 3435314400
commit 0d6279617b

View File

@@ -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);
}
});