mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47: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));
|
||||
|
||||
if (_.isObject(object)) {
|
||||
notStrictEqual(clone, object);
|
||||
notEqual(clone, object);
|
||||
} else {
|
||||
skipTest();
|
||||
}
|
||||
@@ -2365,12 +2365,10 @@
|
||||
});
|
||||
|
||||
test('should deep compare `properties` values', function() {
|
||||
var collection = [
|
||||
{ 'a': { 'b': 1, 'c': 2 } },
|
||||
{ 'a': { 'b': 2, 'c': 3 } }
|
||||
];
|
||||
var collection = [{ 'a': { 'b': 1, 'c': 2 } }],
|
||||
expected = _.cloneDeep(collection);
|
||||
|
||||
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