mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Fix fp rearg order for zipWith.
This commit is contained in:
@@ -137,7 +137,8 @@ exports.methodRearg = {
|
|||||||
'pullAllBy': [2, 1, 0],
|
'pullAllBy': [2, 1, 0],
|
||||||
'setWith': [3, 1, 2, 0],
|
'setWith': [3, 1, 2, 0],
|
||||||
'sortedIndexBy': [2, 1, 0],
|
'sortedIndexBy': [2, 1, 0],
|
||||||
'sortedLastIndexBy': [2, 1, 0]
|
'sortedLastIndexBy': [2, 1, 0],
|
||||||
|
'zipWith': [1, 2, 0]
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Used to map method names to spread configs. */
|
/** Used to map method names to spread configs. */
|
||||||
|
|||||||
@@ -1237,6 +1237,25 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
QUnit.module('fp.zipWith');
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
QUnit.test('should zip arrays combining grouped elements with `iteratee`', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
var array1 = [1, 2, 3],
|
||||||
|
array2 = [4, 5, 6];
|
||||||
|
|
||||||
|
var actual = fp.zipWith(function(a, b) {
|
||||||
|
return a + b;
|
||||||
|
})(array1)(array2);
|
||||||
|
|
||||||
|
assert.deepEqual(actual, [5, 7, 9]);
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.config.asyncRetries = 10;
|
QUnit.config.asyncRetries = 10;
|
||||||
QUnit.config.hidepassed = true;
|
QUnit.config.hidepassed = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user