mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Remove unneeded bizarro tests.
This commit is contained in:
26
test/test.js
26
test/test.js
@@ -823,7 +823,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should avoid non-native built-ins', function(assert) {
|
QUnit.test('should avoid non-native built-ins', function(assert) {
|
||||||
assert.expect(8);
|
assert.expect(6);
|
||||||
|
|
||||||
function message(lodashMethod, nativeMethod) {
|
function message(lodashMethod, nativeMethod) {
|
||||||
return '`' + lodashMethod + '` should avoid overwritten native `' + nativeMethod + '`';
|
return '`' + lodashMethod + '` should avoid overwritten native `' + nativeMethod + '`';
|
||||||
@@ -840,27 +840,11 @@
|
|||||||
|
|
||||||
if (lodashBizarro) {
|
if (lodashBizarro) {
|
||||||
try {
|
try {
|
||||||
var actual = lodashBizarro.keysIn(new Foo).sort();
|
var actual = lodashBizarro.create(Foo.prototype);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
actual = null;
|
actual = null;
|
||||||
}
|
}
|
||||||
var label = message('_.keysIn', 'Object#propertyIsEnumerable');
|
var label = message('_.create', 'Object.create');
|
||||||
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.create(Foo.prototype);
|
|
||||||
} catch (e) {
|
|
||||||
actual = null;
|
|
||||||
}
|
|
||||||
label = message('_.create', 'Object.create');
|
|
||||||
assert.ok(actual instanceof Foo, label);
|
assert.ok(actual instanceof Foo, label);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -872,7 +856,7 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
actual = null;
|
actual = null;
|
||||||
}
|
}
|
||||||
label = message('_.difference`, `_.intersection`, and `_.uniq', 'Object.create` and `Map');
|
label = message('_.difference`, `_.intersection`, and `_.uniq', 'Map');
|
||||||
assert.deepEqual(actual, [[otherObject], [object], [object]], label);
|
assert.deepEqual(actual, [[otherObject], [object], [object]], label);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -925,7 +909,7 @@
|
|||||||
assert.deepEqual(actual, [], label);
|
assert.deepEqual(actual, [], label);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipAssert(assert, 8);
|
skipAssert(assert, 6);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|||||||
Reference in New Issue
Block a user