Ensure _.pickBy doesn’t treat keys with dots as deep paths. [closes #2808]

This commit is contained in:
John-David Dalton
2016-11-14 00:47:47 -08:00
parent 13d315a93b
commit 102c5f00d7
2 changed files with 19 additions and 1 deletions

View File

@@ -17640,6 +17640,15 @@
assert.deepEqual(actual, { 'a': 1, 'c': 3 });
});
QUnit.test('should not treat keys with dots as deep paths', function(assert) {
assert.expect(1);
var object = { 'a.b.c': 1 },
actual = _.pickBy(object, stubTrue);
assert.deepEqual(actual, { 'a.b.c': 1 });
});
}());
/*--------------------------------------------------------------------------*/