1 // Copyright (C) 2015 André Bargull. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-getcapabilitiesexecutor-functions
6 description: GetCapabilitiesExecutor function is not constructor
8 17 ECMAScript Standard Built-in Objects:
9 Built-in function objects that are not identified as constructors do not
10 implement the [[Construct]] internal method unless otherwise specified
11 in the description of a particular function.
12 includes: [isConstructor.js]
13 features: [Reflect.construct, arrow-function]
18 function NotPromise(executor) {
19 executorFunction = executor;
20 executor(function() {}, function() {});
22 Promise.resolve.call(NotPromise);
25 Object.prototype.hasOwnProperty.call(executorFunction, "prototype"),
27 'Object.prototype.hasOwnProperty.call(executorFunction, "prototype") must return false'
29 assert.sameValue(isConstructor(executorFunction), false, 'isConstructor(executorFunction) must return false');
31 assert.throws(TypeError, () => {
32 new executorFunction();