mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Add _.createCallback unit test for calling without an argCount.
Former-commit-id: 1d9e14163a77564c9fecdba56590131e8cfcebe0
This commit is contained in:
12
test/test.js
12
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);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user