mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Ensure _.chunk floors size values. [closes #1243]
This commit is contained in:
@@ -1846,6 +1846,10 @@
|
||||
deepEqual(actual, expected);
|
||||
});
|
||||
|
||||
test('should floor `size` values', 1, function() {
|
||||
deepEqual(_.chunk(array, array.length / 4), [[0], [1], [2], [3], [4], [5]]);
|
||||
});
|
||||
|
||||
test('should work as an iteratee for methods like `_.map`', 1, function() {
|
||||
var actual = _.map([[1, 2], [3, 4]], _.chunk);
|
||||
deepEqual(actual, [[[1], [2]], [[3], [4]]]);
|
||||
|
||||
Reference in New Issue
Block a user