Add bizarro test for _.isEmpty.

This commit is contained in:
John-David Dalton
2016-04-01 17:19:16 -07:00
parent e22be612e2
commit c21174f7f9

View File

@@ -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);
}
});
}());