mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Add more stack tests.
This commit is contained in:
28
test/test.js
28
test/test.js
@@ -2708,9 +2708,7 @@
|
||||
var actual;
|
||||
|
||||
_.cloneDeepWith({ 'a': 1 }, function() {
|
||||
if (arguments.length > 1) {
|
||||
actual || (actual = _.last(arguments));
|
||||
}
|
||||
actual = _.last(arguments);
|
||||
});
|
||||
|
||||
assert.ok(actual instanceof mapCaches.Stack);
|
||||
@@ -10757,6 +10755,18 @@
|
||||
assert.deepEqual(actual, expected);
|
||||
});
|
||||
|
||||
QUnit.test('should provide `stack` to `customizer`', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var actual;
|
||||
|
||||
_.isMatchWith({ 'a': 1 }, { 'a': 1 }, function() {
|
||||
actual = _.last(arguments);
|
||||
});
|
||||
|
||||
assert.ok(actual instanceof mapCaches.Stack);
|
||||
});
|
||||
|
||||
QUnit.test('should ensure `customizer` is a function', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
@@ -15023,6 +15033,18 @@
|
||||
assert.deepEqual(actual, { 'a': { 'b': [0, 1, 2] } });
|
||||
});
|
||||
|
||||
QUnit.test('should provide `stack` to `customizer`', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var actual;
|
||||
|
||||
_.mergeWith({}, { 'a': { 'b': 1 } }, function() {
|
||||
actual = _.last(arguments);
|
||||
});
|
||||
|
||||
assert.ok(actual instanceof mapCaches.Stack);
|
||||
});
|
||||
|
||||
QUnit.test('should overwrite primitives with source object clones', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user