From c6340a64fe6b45481c5ad7bd93af1ac03b94ccaa Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 27 Aug 2013 08:22:04 -0700 Subject: [PATCH] Add `_.createCallback` unit test for calling without an `argCount`. Former-commit-id: 1d9e14163a77564c9fecdba56590131e8cfcebe0 --- test/test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test.js b/test/test.js index 8e6d9502f..33e292d9a 100644 --- a/test/test.js +++ b/test/test.js @@ -668,6 +668,18 @@ callback = _.createCallback(_.partialRight(func, 3), object); deepEqual(callback(2), expected); }); + + test('should work without an `argCount`', function() { + var args, + expected = ['a', 'b', 'c', 'd', 'e']; + + var callback = _.createCallback(function() { + args = slice.call(arguments); + }); + + callback.apply(null, expected); + deepEqual(args, expected); + }); }()); /*--------------------------------------------------------------------------*/