mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 12:27:49 +00:00
Cleanup deep _.clone and _.where unit tests.
Former-commit-id: b7106461640259ca3bf60c1fabb91b59b241e35f
This commit is contained in:
10
test/test.js
10
test/test.js
@@ -343,7 +343,7 @@
|
|||||||
ok(_.isEqual(object, clone));
|
ok(_.isEqual(object, clone));
|
||||||
|
|
||||||
if (_.isObject(object)) {
|
if (_.isObject(object)) {
|
||||||
notStrictEqual(clone, object);
|
notEqual(clone, object);
|
||||||
} else {
|
} else {
|
||||||
skipTest();
|
skipTest();
|
||||||
}
|
}
|
||||||
@@ -2365,12 +2365,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should deep compare `properties` values', function() {
|
test('should deep compare `properties` values', function() {
|
||||||
var collection = [
|
var collection = [{ 'a': { 'b': 1, 'c': 2 } }],
|
||||||
{ 'a': { 'b': 1, 'c': 2 } },
|
expected = _.cloneDeep(collection);
|
||||||
{ 'a': { 'b': 2, 'c': 3 } }
|
|
||||||
];
|
|
||||||
|
|
||||||
deepEqual(_.where(collection, { 'a': { 'b': 1 } }), [{ 'a': { 'b': 1, 'c': 2 } }]);
|
deepEqual(_.where(collection, { 'a': { 'b': 1 } }), expected);
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user