mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Add _.isNative test for Promise.
This commit is contained in:
20
test/test.js
20
test/test.js
@@ -10661,23 +10661,13 @@
|
|||||||
var args = arguments;
|
var args = arguments;
|
||||||
|
|
||||||
QUnit.test('should return `true` for native methods', function(assert) {
|
QUnit.test('should return `true` for native methods', function(assert) {
|
||||||
assert.expect(6);
|
assert.expect(1);
|
||||||
|
|
||||||
lodashStable.each([Array, create, root.encodeURI, slice, Uint8Array], function(func) {
|
var values = [Array, body && body.cloneNode, create, root.encodeURI, Promise, slice, Uint8Array],
|
||||||
if (func) {
|
expected = lodashStable.map(values, Boolean),
|
||||||
assert.strictEqual(_.isNative(func), true);
|
actual = lodashStable.map(values, _.isNative);
|
||||||
}
|
|
||||||
else {
|
|
||||||
skipAssert(assert);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (body) {
|
assert.deepEqual(actual, expected);
|
||||||
assert.strictEqual(_.isNative(body.cloneNode), true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
skipAssert(assert);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should return `false` for non-native methods', function(assert) {
|
QUnit.test('should return `false` for non-native methods', function(assert) {
|
||||||
|
|||||||
Reference in New Issue
Block a user