mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Cleanup assignment test.
This commit is contained in:
26
test/test.js
26
test/test.js
@@ -7393,18 +7393,7 @@
|
|||||||
args || (args = lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
|
args || (args = lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.deepEqual(args, expected, 'primitive property values');
|
assert.deepEqual(args, expected, 'primitive values');
|
||||||
|
|
||||||
args = undefined;
|
|
||||||
object = { 'a': 1 };
|
|
||||||
source = { 'b': 2 };
|
|
||||||
expected = lodashStable.map([undefined, 2, 'b', object, source], lodashStable.cloneDeep);
|
|
||||||
|
|
||||||
func(object, source, function() {
|
|
||||||
args || (args = lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.deepEqual(args, expected, 'missing destination property');
|
|
||||||
|
|
||||||
var argsList = [],
|
var argsList = [],
|
||||||
objectValue = [1, 2],
|
objectValue = [1, 2],
|
||||||
@@ -7421,7 +7410,18 @@
|
|||||||
argsList.push(lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
|
argsList.push(lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.deepEqual(argsList, expected, 'object property values');
|
assert.deepEqual(argsList, expected, 'object values');
|
||||||
|
|
||||||
|
args = undefined;
|
||||||
|
object = { 'a': 1 };
|
||||||
|
source = { 'b': 2 };
|
||||||
|
expected = lodashStable.map([undefined, 2, 'b', object, source], lodashStable.cloneDeep);
|
||||||
|
|
||||||
|
func(object, source, function() {
|
||||||
|
args || (args = lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.deepEqual(args, expected, 'undefined properties');
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('`_.' + methodName + '` should not treat the second argument as a `customizer` callback', function(assert) {
|
QUnit.test('`_.' + methodName + '` should not treat the second argument as a `customizer` callback', function(assert) {
|
||||||
|
|||||||
Reference in New Issue
Block a user