mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Fix failing test in Node < 0.12.
This commit is contained in:
@@ -19370,8 +19370,11 @@
|
|||||||
QUnit.test('`_.' + methodName + '` should convert empty values to `0` or `NaN`', function(assert) {
|
QUnit.test('`_.' + methodName + '` should convert empty values to `0` or `NaN`', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
var values = falsey.concat(whitespace),
|
var values = falsey.concat(whitespace);
|
||||||
expected = lodashStable.map(values, isInt ? lodashStable.constant(0) : Number);
|
|
||||||
|
var expected = lodashStable.map(values, function(value) {
|
||||||
|
return (isInt || (value === whitespace)) ? 0 : Number(value);
|
||||||
|
});
|
||||||
|
|
||||||
var actual = lodashStable.map(values, function(value, index) {
|
var actual = lodashStable.map(values, function(value, index) {
|
||||||
return index ? func(value) : func();
|
return index ? func(value) : func();
|
||||||
|
|||||||
Reference in New Issue
Block a user