From 577226bbd054f5a094bddabcada852d3c49c1ced Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 24 Mar 2016 00:10:51 -0700 Subject: [PATCH] Add number object tests to number coercion methods. --- test/test.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/test.js b/test/test.js index b243a37ca..a7e6eac41 100644 --- a/test/test.js +++ b/test/test.js @@ -22081,17 +22081,21 @@ var func = _[methodName]; QUnit.test('`_.' + methodName + '` should preserve sign of `0`', function(assert) { - assert.expect(1); + assert.expect(2); var values = [0, '0', -0, '-0'], expected = [[0, Infinity], [0, Infinity], [-0, -Infinity], [-0, -Infinity]]; - var actual = lodashStable.map(values, function(value) { - var result = func(value); - return [result, 1 / result]; - }); + lodashStable.times(2, function(index) { + var others = lodashStable.map(values, index ? Object : identity); - assert.deepEqual(actual, expected); + var actual = lodashStable.map(others, function(value) { + var result = func(value); + return [result, 1 / result]; + }); + + assert.deepEqual(actual, expected); + }); }); });