diff --git a/fp/_mapping.js b/fp/_mapping.js index d3c65fbaa..57fbf28e5 100644 --- a/fp/_mapping.js +++ b/fp/_mapping.js @@ -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. */ diff --git a/test/test-fp.js b/test/test-fp.js index 5cccbc64a..4b2f7b77d 100644 --- a/test/test-fp.js +++ b/test/test-fp.js @@ -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;