mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Add fp.invokeArgs.
This commit is contained in:
@@ -393,8 +393,9 @@
|
||||
assert.expect(1);
|
||||
|
||||
var funcMethods = [
|
||||
'after', 'ary', 'before', 'bind', 'bindKey', 'curryN', 'debounce', 'delay',
|
||||
'overArgs', 'partial', 'partialRight', 'rearg', 'throttle', 'wrap'
|
||||
'after', 'ary', 'before', 'bind', 'bindKey', 'curryN', 'debounce',
|
||||
'delay', 'overArgs', 'partial', 'partialRight', 'rearg', 'throttle',
|
||||
'wrap'
|
||||
];
|
||||
|
||||
var exceptions = _.difference(funcMethods.concat('matchesProperty'), ['cloneDeepWith', 'cloneWith', 'delay']),
|
||||
@@ -1143,6 +1144,32 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('fp.invoke');
|
||||
|
||||
(function() {
|
||||
QUnit.test('should not accept an `args` param', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var actual = fp.invoke('toUpperCase')('a');
|
||||
assert.strictEqual(actual, 'A');
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('fp.invokeArgs');
|
||||
|
||||
(function() {
|
||||
QUnit.test('should accept an `args` param', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var actual = fp.invokeArgs('concat')('a')(['b', 'c']);
|
||||
assert.strictEqual(actual, 'abc');
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('fp.iteratee');
|
||||
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user