mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Ensure baseGet and result work with strings on nested objects.
This commit is contained in:
@@ -13159,12 +13159,18 @@
|
||||
});
|
||||
});
|
||||
|
||||
test('`_.' + methodName + '` should get characters of string indexes (test in IE < 9)', 4, function() {
|
||||
test('`_.' + methodName + '` should get characters of string indexes (test in IE < 9)', 8, function() {
|
||||
_.each([1, [1]], function(path) {
|
||||
_.each(['xo', Object('xo')], function(string) {
|
||||
strictEqual(func(string, path), 'o');
|
||||
});
|
||||
});
|
||||
|
||||
_.each([{ 'a': 'xo' }, { 'a': Object('xo') }], function(object) {
|
||||
_.each(['a[1]', ['a', '1']], function(path) {
|
||||
strictEqual(func(object, path), 'o');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('`_.' + methodName + '` should get a key over a path', 2, function() {
|
||||
|
||||
Reference in New Issue
Block a user