From c21174f7f9586063ed67c9f58cad0bcd9bac5d43 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 1 Apr 2016 17:19:16 -0700 Subject: [PATCH] Add bizarro test for `_.isEmpty`. --- test/test.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index 63ad2ce54..107a8e75f 100644 --- a/test/test.js +++ b/test/test.js @@ -786,7 +786,7 @@ }); QUnit.test('should avoid non-native built-ins', function(assert) { - assert.expect(6); + assert.expect(7); function message(lodashMethod, nativeMethod) { return '`' + lodashMethod + '` should avoid overwritten native `' + nativeMethod + '`'; @@ -810,6 +810,14 @@ var label = message('_.keysIn', 'Object#propertyIsEnumerable'); assert.deepEqual(actual, ['a', 'b'], label); + try { + var actual = lodashBizarro.isEmpty({}); + } catch (e) { + actual = null; + } + var label = message('_.isEmpty', 'Object#propertyIsEnumerable'); + assert.strictEqual(actual, true, label); + try { actual = [ lodashBizarro.difference([object, otherObject], largeArray), @@ -875,7 +883,7 @@ assert.deepEqual(actual, [], label); } else { - skipAssert(assert, 6); + skipAssert(assert, 7); } }); }());