mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Add _.isEqual tests for arrays and objects from different documents.
This commit is contained in:
10
test/test.js
10
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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user