mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Ensure _.pullAt sorts indexes greater than 9 correctly. [closes #2254]
This commit is contained in:
@@ -17717,11 +17717,11 @@
|
||||
QUnit.test('should work with unsorted indexes', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
var array = [1, 2, 3, 4],
|
||||
actual = _.pullAt(array, [1, 3, 0]);
|
||||
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
actual = _.pullAt(array, [1, 3, 11, 7, 5, 9]);
|
||||
|
||||
assert.deepEqual(array, [3]);
|
||||
assert.deepEqual(actual, [2, 4, 1]);
|
||||
assert.deepEqual(array, [1, 3, 5, 7, 9, 11]);
|
||||
assert.deepEqual(actual, [2, 4, 12, 8, 6, 10]);
|
||||
});
|
||||
|
||||
QUnit.test('should work with repeated indexes', function(assert) {
|
||||
|
||||
Reference in New Issue
Block a user