|
94 | 94 | alwaysFalse = function() { return false; };
|
95 | 95 |
|
96 | 96 | var alwaysNaN = function() { return NaN; },
|
97 |
| - alwaysNull = function() { return null; }, |
98 |
| - alwaysUndefined = function() { return undefined; }; |
| 97 | + alwaysNull = function() { return null; }; |
99 | 98 |
|
100 | 99 | var alwaysZero = function() { return 0; },
|
101 | 100 | alwaysOne = function() { return 1; },
|
|
1283 | 1282 | }));
|
1284 | 1283 |
|
1285 | 1284 | defineProperty(object, 'b', lodashStable.assign({}, descriptor, {
|
1286 |
| - 'get': alwaysUndefined |
| 1285 | + 'get': noop |
1287 | 1286 | }));
|
1288 | 1287 |
|
1289 | 1288 | defineProperty(object, 'c', lodashStable.assign({}, descriptor, {
|
|
1359 | 1358 | assert.expect(1);
|
1360 | 1359 |
|
1361 | 1360 | var expected = { 'a': undefined };
|
1362 |
| - assert.deepEqual(func({}, expected, alwaysUndefined), expected); |
| 1361 | + assert.deepEqual(func({}, expected, noop), expected); |
1363 | 1362 | });
|
1364 | 1363 | });
|
1365 | 1364 |
|
|
8139 | 8138 | assert.expect(1);
|
8140 | 8139 |
|
8141 | 8140 | var values = [null, undefined],
|
8142 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 8141 | + expected = lodashStable.map(values, noop); |
8143 | 8142 |
|
8144 | 8143 | var actual = lodashStable.map(values, function(value) {
|
8145 | 8144 | try {
|
|
14126 | 14125 | assert.expect(1);
|
14127 | 14126 |
|
14128 | 14127 | var values = falsey.concat([[]]),
|
14129 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 14128 | + expected = lodashStable.map(values, noop); |
14130 | 14129 |
|
14131 | 14130 | var actual = lodashStable.map(values, function(value, index) {
|
14132 | 14131 | try {
|
|
14867 | 14866 |
|
14868 | 14867 | var source1 = { 'a': { 'b': { 'c': 1 } } },
|
14869 | 14868 | source2 = { 'a': { 'b': { 'd': 2 } } },
|
14870 |
| - actual = _.mergeWith({}, source1, source2, alwaysUndefined); |
| 14869 | + actual = _.mergeWith({}, source1, source2, noop); |
14871 | 14870 |
|
14872 | 14871 | assert.deepEqual(source1.a.b, { 'c': 1 });
|
14873 | 14872 | });
|
|
14974 | 14973 | assert.expect(2);
|
14975 | 14974 |
|
14976 | 14975 | var values = [, null, undefined],
|
14977 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 14976 | + expected = lodashStable.map(values, noop); |
14978 | 14977 |
|
14979 | 14978 | lodashStable.each(['constructor', ['constructor']], function(path) {
|
14980 | 14979 | var method = _.method(path);
|
|
14991 | 14990 | assert.expect(2);
|
14992 | 14991 |
|
14993 | 14992 | var values = [, null, undefined],
|
14994 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 14993 | + expected = lodashStable.map(values, noop); |
14995 | 14994 |
|
14996 | 14995 | lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
|
14997 | 14996 | var method = _.method(path);
|
|
15129 | 15128 | assert.expect(2);
|
15130 | 15129 |
|
15131 | 15130 | var values = [, null, undefined],
|
15132 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 15131 | + expected = lodashStable.map(values, noop); |
15133 | 15132 |
|
15134 | 15133 | lodashStable.each(['constructor', ['constructor']], function(path) {
|
15135 | 15134 | var actual = lodashStable.map(values, function(value, index) {
|
|
15145 | 15144 | assert.expect(2);
|
15146 | 15145 |
|
15147 | 15146 | var values = [, null, undefined],
|
15148 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 15147 | + expected = lodashStable.map(values, noop); |
15149 | 15148 |
|
15150 | 15149 | lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
|
15151 | 15150 | var actual = lodashStable.map(values, function(value, index) {
|
|
15211 | 15210 | assert.expect(1);
|
15212 | 15211 |
|
15213 | 15212 | var values = falsey.concat([[]]),
|
15214 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 15213 | + expected = lodashStable.map(values, noop); |
15215 | 15214 |
|
15216 | 15215 | var actual = lodashStable.map(values, function(value, index) {
|
15217 | 15216 | try {
|
|
15762 | 15761 | assert.expect(1);
|
15763 | 15762 |
|
15764 | 15763 | var values = empties.concat(true, new Date, _, 1, /x/, 'a'),
|
15765 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 15764 | + expected = lodashStable.map(values, noop); |
15766 | 15765 |
|
15767 | 15766 | var actual = lodashStable.map(values, function(value, index) {
|
15768 | 15767 | return index ? _.noop(value) : _.noop();
|
|
17386 | 17385 | assert.expect(2);
|
17387 | 17386 |
|
17388 | 17387 | var values = [, null, undefined],
|
17389 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 17388 | + expected = lodashStable.map(values, noop); |
17390 | 17389 |
|
17391 | 17390 | lodashStable.each(['constructor', ['constructor']], function(path) {
|
17392 | 17391 | var prop = _.property(path);
|
|
17403 | 17402 | assert.expect(2);
|
17404 | 17403 |
|
17405 | 17404 | var values = [, null, undefined],
|
17406 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 17405 | + expected = lodashStable.map(values, noop); |
17407 | 17406 |
|
17408 | 17407 | lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
|
17409 | 17408 | var prop = _.property(path);
|
|
17518 | 17517 | assert.expect(2);
|
17519 | 17518 |
|
17520 | 17519 | var values = [, null, undefined],
|
17521 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 17520 | + expected = lodashStable.map(values, noop); |
17522 | 17521 |
|
17523 | 17522 | lodashStable.each(['constructor', ['constructor']], function(path) {
|
17524 | 17523 | var actual = lodashStable.map(values, function(value, index) {
|
|
17534 | 17533 | assert.expect(2);
|
17535 | 17534 |
|
17536 | 17535 | var values = [, null, undefined],
|
17537 |
| - expected = lodashStable.map(values, alwaysUndefined); |
| 17536 | + expected = lodashStable.map(values, noop); |
17538 | 17537 |
|
17539 | 17538 | lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
|
17540 | 17539 | var actual = lodashStable.map(values, function(value, index) {
|
|
17748 | 17747 |
|
17749 | 17748 | assert.deepEqual(actual, expected);
|
17750 | 17749 |
|
17751 |
| - expected = lodashStable.map(values, alwaysUndefined), |
| 17750 | + expected = lodashStable.map(values, noop), |
17752 | 17751 | actual = _.at(array, values);
|
17753 | 17752 |
|
17754 | 17753 | assert.deepEqual(actual, expected);
|
|
18234 | 18233 | assert.expect(1);
|
18235 | 18234 |
|
18236 | 18235 | var actual = [],
|
18237 |
| - expected = lodashStable.map(empties, alwaysUndefined); |
| 18236 | + expected = lodashStable.map(empties, noop); |
18238 | 18237 |
|
18239 | 18238 | lodashStable.each(empties, function(value) {
|
18240 | 18239 | try {
|
|
18760 | 18759 | assert.expect(2);
|
18761 | 18760 |
|
18762 | 18761 | var values = [null, undefined],
|
18763 |
| - expected = lodashStable.map(values, alwaysUndefined), |
| 18762 | + expected = lodashStable.map(values, noop), |
18764 | 18763 | paths = ['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']];
|
18765 | 18764 |
|
18766 | 18765 | lodashStable.each(paths, function(path) {
|
|
19168 | 19167 | QUnit.test('should return `undefined` when sampling empty collections', function(assert) {
|
19169 | 19168 | assert.expect(1);
|
19170 | 19169 |
|
19171 |
| - var expected = lodashStable.map(empties, alwaysUndefined); |
| 19170 | + var expected = lodashStable.map(empties, noop); |
19172 | 19171 |
|
19173 | 19172 | var actual = lodashStable.transform(empties, function(result, value) {
|
19174 | 19173 | try {
|
|
19301 | 19300 | QUnit.test('should work with a `customizer` that returns `undefined`', function(assert) {
|
19302 | 19301 | assert.expect(1);
|
19303 | 19302 |
|
19304 |
| - var actual = _.setWith({}, 'a[0].b.c', 4, alwaysUndefined); |
| 19303 | + var actual = _.setWith({}, 'a[0].b.c', 4, noop); |
19305 | 19304 | assert.deepEqual(actual, { 'a': [{ 'b': { 'c': 4 } }] });
|
19306 | 19305 | });
|
19307 | 19306 | }());
|
|
24182 | 24181 | QUnit.test('should work with a `customizer` that returns `undefined`', function(assert) {
|
24183 | 24182 | assert.expect(1);
|
24184 | 24183 |
|
24185 |
| - var actual = _.updateWith({}, 'a[0].b.c', alwaysFour, alwaysUndefined); |
| 24184 | + var actual = _.updateWith({}, 'a[0].b.c', alwaysFour, noop); |
24186 | 24185 | assert.deepEqual(actual, { 'a': [{ 'b': { 'c': 4 } }] });
|
24187 | 24186 | });
|
24188 | 24187 | }());
|
|
0 commit comments