Ensure has treats nested sparse arrays consistently.

This commit is contained in:
John-David Dalton
2016-03-31 19:25:40 -07:00
parent 642d248f99
commit 3902fd1a67
2 changed files with 27 additions and 22 deletions

View File

@@ -7243,7 +7243,7 @@
});
QUnit.test('`_.' + methodName + '` should return `true` for index values within bounds for arrays, `arguments` objects, and strings', function(assert) {
assert.expect(1);
assert.expect(2);
var string = Object('abc');
delete args[0];
@@ -7256,6 +7256,16 @@
return func(value, 0);
});
assert.deepEqual(actual, expected);
expected = lodashStable.map(values, lodashStable.constant([true, true]));
actual = lodashStable.map(values, function(value) {
return lodashStable.map(['a[0]', ['a', '0']], function(path) {
return func({ 'a': value }, path);
});
});
assert.deepEqual(actual, expected);
args[0] = 1;
});