mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Ensure _.where works correctly for nested properties and give indicator arguments more meaningful names.
Former-commit-id: c35e2817125cd852a66066ccdef44bcc40c93e61
This commit is contained in:
@@ -2366,11 +2366,11 @@
|
||||
|
||||
test('should deep compare `properties` values', function() {
|
||||
var collection = [
|
||||
{ 'a': { 'b': 1 }, 'c': 2 },
|
||||
{ 'a': { 'b': 2 }, 'c': 3 }
|
||||
{ 'a': { 'b': 1, 'c': 2 } },
|
||||
{ 'a': { 'b': 2, 'c': 3 } }
|
||||
];
|
||||
|
||||
deepEqual(_.where(collection, { 'a': { 'b': 1 } }), [{ 'a': { 'b': 1 }, 'c': 2 }]);
|
||||
deepEqual(_.where(collection, { 'a': { 'b': 1 } }), [{ 'a': { 'b': 1, 'c': 2 } }]);
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user