mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Ensure has treats nested sparse arrays consistently.
This commit is contained in:
12
test/test.js
12
test/test.js
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user