Fix fp rearg order for zipWith.

This commit is contained in:
John-David Dalton
2016-02-12 00:04:16 -08:00
parent d6f6007692
commit a055b0a04f
2 changed files with 21 additions and 1 deletions

View File

@@ -137,7 +137,8 @@ exports.methodRearg = {
'pullAllBy': [2, 1, 0],
'setWith': [3, 1, 2, 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. */

View File

@@ -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.hidepassed = true;