From c3ec32cc169c9b2b59f4af5e816e2e8133b9210f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 25 Oct 2015 02:10:08 -0700 Subject: [PATCH] Add empty invocation test to string methods test. --- test/test.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/test.js b/test/test.js index e632ce27b..e23fb88b8 100644 --- a/test/test.js +++ b/test/test.js @@ -21845,11 +21845,16 @@ var func = _[methodName]; QUnit.test('`_.' + methodName + '` should return an empty string for empty values', function(assert) { - assert.expect(3); + assert.expect(1); - assert.strictEqual(func(null), ''); - assert.strictEqual(func(undefined), ''); - assert.strictEqual(func(''), ''); + var values = [, null, undefined, ''], + expected = lodashStable.map(values, lodashStable.constant('')); + + var actual = lodashStable.map(values, function(value, index) { + return index ? func(value) : func(); + }); + + assert.deepEqual(actual, expected); }); }); }());