From 880ffcb1f6458be41220d34059abfe2e23d33645 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 22 Jan 2016 23:54:40 -0600 Subject: [PATCH] Add more fp tests for key methods. --- test/test-fp.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/test-fp.js b/test/test-fp.js index 41ff5d0b8..79e960150 100644 --- a/test/test-fp.js +++ b/test/test-fp.js @@ -779,15 +779,17 @@ var object = { 'a': 1 }; QUnit.test('should provide the correct `iteratee` arguments', function(assert) { - assert.expect(1); + assert.expect(3); - var args; + _.each(['findKey', 'findLastKey', 'mapKeys'], function(methodName) { + var args; - var actual = fp.findKey(function() { - args || (args = _.map(arguments, _.cloneDeep)); - }, object); + var actual = fp[methodName](function() { + args || (args = slice.call(arguments)); + }, object); - assert.deepEqual(args, ['a'], 'fp.findKey'); + assert.deepEqual(args, ['a'], 'fp.' + methodName); + }); }); }());