mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Add fp customizer test for _.setWith.
This commit is contained in:
@@ -904,7 +904,7 @@
|
||||
object = { 'a': 1 };
|
||||
|
||||
QUnit.test('should provide the correct `customizer` arguments', function(assert) {
|
||||
assert.expect(3);
|
||||
assert.expect(4);
|
||||
|
||||
var args,
|
||||
value = _.clone(object);
|
||||
@@ -939,6 +939,14 @@
|
||||
|
||||
args[5] = _.omitBy(args[5], _.isFunction);
|
||||
assert.deepEqual(args, expected, 'fp.mergeWith');
|
||||
|
||||
args = undefined;
|
||||
value = _.clone(object);
|
||||
actual = fp.setWith(function() {
|
||||
args || (args = _.map(arguments, _.cloneDeep));
|
||||
}, 'b.c', 2, value);
|
||||
|
||||
assert.deepEqual(args, [undefined, 'b', { 'a': 1 }], 'fp.setWith');
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user