mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Add more fp tests for key methods.
This commit is contained in:
@@ -779,15 +779,17 @@
|
|||||||
var object = { 'a': 1 };
|
var object = { 'a': 1 };
|
||||||
|
|
||||||
QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
|
QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(3);
|
||||||
|
|
||||||
var args;
|
_.each(['findKey', 'findLastKey', 'mapKeys'], function(methodName) {
|
||||||
|
var args;
|
||||||
|
|
||||||
var actual = fp.findKey(function() {
|
var actual = fp[methodName](function() {
|
||||||
args || (args = _.map(arguments, _.cloneDeep));
|
args || (args = slice.call(arguments));
|
||||||
}, object);
|
}, object);
|
||||||
|
|
||||||
assert.deepEqual(args, ['a'], 'fp.findKey');
|
assert.deepEqual(args, ['a'], 'fp.' + methodName);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user