mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +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;
|
var actual;
|
||||||
|
|
||||||
_.cloneDeepWith({ 'a': 1 }, function() {
|
_.cloneDeepWith({ 'a': 1 }, function() {
|
||||||
if (arguments.length > 1) {
|
actual = _.last(arguments);
|
||||||
actual || (actual = _.last(arguments));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.ok(actual instanceof mapCaches.Stack);
|
assert.ok(actual instanceof mapCaches.Stack);
|
||||||
@@ -10757,6 +10755,18 @@
|
|||||||
assert.deepEqual(actual, expected);
|
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) {
|
QUnit.test('should ensure `customizer` is a function', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
@@ -15023,6 +15033,18 @@
|
|||||||
assert.deepEqual(actual, { 'a': { 'b': [0, 1, 2] } });
|
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) {
|
QUnit.test('should overwrite primitives with source object clones', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user