From 345746f7ab8b9ed1e9e2112315d8c087e23cc8a2 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 21 Jan 2016 01:05:11 -0600 Subject: [PATCH] Add another test to help catch incorrect fp mapping. --- test/test-fp.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/test-fp.js b/test/test-fp.js index 2666ab4ef..f76763de8 100644 --- a/test/test-fp.js +++ b/test/test-fp.js @@ -88,6 +88,23 @@ assert.deepEqual(methodNames, []); }); + + QUnit.test('should have >= arity of `aryMethod` designation', function(assert) { + assert.expect(4); + + _.times(4, function(index) { + var aryCap = index + 1; + + var methodNames = _.filter(mapping.aryMethod[aryCap], function(methodName) { + var key = _.result(mapping.key, methodName, methodName), + arity = _[key].length; + + return arity != 0 && arity < aryCap; + }); + + assert.deepEqual(methodNames, [], '`aryMethod[' + aryCap + ']`'); + }); + }); }()); /*--------------------------------------------------------------------------*/