Add _.isNative test for Promise.

This commit is contained in:
John-David Dalton
2016-04-01 19:17:52 -07:00
parent 4c8836a24a
commit c4a78445b3

View File

@@ -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) {