mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Ensure _.defaultsDeep doesn't convert function properties to objects. [closes #1783]
This commit is contained in:
10
test/test.js
10
test/test.js
@@ -3998,6 +3998,16 @@
|
||||
assert.strictEqual(actual.a.b, null);
|
||||
});
|
||||
|
||||
QUnit.test('should not convert function properties to objects', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
var actual = _.defaultsDeep({}, { 'a': noop });
|
||||
assert.strictEqual(actual.a, noop);
|
||||
|
||||
actual = _.defaultsDeep({}, { 'a': { 'b': noop } });
|
||||
assert.strictEqual(actual.a.b, noop);
|
||||
});
|
||||
|
||||
QUnit.test('should overwrite `undefined` values', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user