Add _.createCallback unit test for calling without an argCount.

Former-commit-id: 1d9e14163a77564c9fecdba56590131e8cfcebe0
This commit is contained in:
John-David Dalton
2013-08-27 08:22:04 -07:00
parent 265b440c37
commit c6340a64fe

View File

@@ -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);
});
}());
/*--------------------------------------------------------------------------*/