diff --git a/lodash.src.js b/lodash.src.js index 3662e75c8..fd00d8c05 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -12080,12 +12080,6 @@ lodash.flattenDeep = flattenDeep; lodash.flow = flow; lodash.flowRight = flowRight; - lodash.forEach = forEach; - lodash.forEachRight = forEachRight; - lodash.forIn = forIn; - lodash.forInRight = forInRight; - lodash.forOwn = forOwn; - lodash.forOwnRight = forOwnRight; lodash.functions = functions; lodash.groupBy = groupBy; lodash.indexBy = indexBy; @@ -12189,6 +12183,12 @@ lodash.findWhere = findWhere; lodash.first = first; lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; lodash.get = get; lodash.gt = gt; lodash.gte = gte; diff --git a/test/test.js b/test/test.js index 2f10be14b..729d1ad28 100644 --- a/test/test.js +++ b/test/test.js @@ -4898,6 +4898,12 @@ 'findLast', 'findLastIndex', 'findLastKey', + 'forEach', + 'forEachRight', + 'forIn', + 'forInRight', + 'forOwn', + 'forOwnRight', 'max', 'min', 'some' @@ -5022,21 +5028,24 @@ test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', 1, function() { if (!isNpm) { - var wrapped = _(array)[methodName](_.noop); - ok(!(wrapped instanceof _)); + var actual = _(array)[methodName](_.noop); + ok(!(actual instanceof _)); } else { skipTest(); } }); - test('`_.' + methodName + '` should return a wrapped value when implicitly chaining', 1, function() { + test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', 2, function() { if (!isNpm) { - var wrapped = _(array).chain()[methodName](_.noop); - ok(wrapped instanceof _); + var wrapped = _(array).chain(), + actual = wrapped[methodName](_.noop); + + ok(actual instanceof _); + notStrictEqual(actual, wrapped); } else { - skipTest(); + skipTest(2); } }); }); @@ -5076,16 +5085,6 @@ } }); - test('`_.' + methodName + '` should not return the existing wrapped value when chaining', 1, function() { - if (!(isBaseEach || isNpm)) { - var wrapped = _(array); - notStrictEqual(wrapped[methodName](_.noop), wrapped); - } - else { - skipTest(); - } - }); - _.each({ 'literal': 'abc', 'object': Object('abc') @@ -5320,8 +5319,10 @@ test('`_.' + methodName + '` should not return the existing wrapped value when chaining', 1, function() { if (!isNpm) { - var wrapped = _({ 'a': 1 }); - notStrictEqual(wrapped[methodName]({ 'b': 2 }), wrapped); + var wrapped = _({ 'a': 1 }), + actual = wrapped[methodName]({ 'b': 2 }); + + notStrictEqual(actual, wrapped); } else { skipTest();