Use isConstructor in "executor-function-nonconstructor.js" (#2393)

This commit is contained in:
Alexey Shvayka 2019-10-08 21:41:29 +03:00 committed by Leo Balter
parent 34cbf0aed2
commit 71a70fc117
1 changed files with 5 additions and 5 deletions

View File

@ -2,13 +2,15 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 25.4.1.5.1
description: GetCapabilitiesExecutor functions are not constructors
esid: sec-getcapabilitiesexecutor-functions
description: GetCapabilitiesExecutor function is not constructor
info: |
17 ECMAScript Standard Built-in Objects:
Built-in function objects that are not identified as constructors do not
implement the [[Construct]] internal method unless otherwise specified
in the description of a particular function.
includes: [isConstructor.js]
features: [Reflect.construct]
---*/
var executorFunction;
@ -20,6 +22,4 @@ function NotPromise(executor) {
Promise.resolve.call(NotPromise);
assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "prototype"), false);
assert.throws(TypeError, function() {
new executorFunction();
});
assert.sameValue(isConstructor(executorFunction), false);