2015-11-24 20:12:55 +01:00
|
|
|
// Copyright (C) 2015 André Bargull. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2019-10-08 20:41:29 +02:00
|
|
|
esid: sec-getcapabilitiesexecutor-functions
|
|
|
|
description: GetCapabilitiesExecutor function is not constructor
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-11-24 20:12:55 +01:00
|
|
|
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.
|
2019-10-08 20:41:29 +02:00
|
|
|
includes: [isConstructor.js]
|
|
|
|
features: [Reflect.construct]
|
2015-11-24 20:12:55 +01:00
|
|
|
---*/
|
|
|
|
|
|
|
|
var executorFunction;
|
2018-02-15 21:11:21 +01:00
|
|
|
|
2015-11-24 20:12:55 +01:00
|
|
|
function NotPromise(executor) {
|
|
|
|
executorFunction = executor;
|
2018-02-15 21:11:21 +01:00
|
|
|
executor(function() {}, function() {});
|
2015-11-24 20:12:55 +01:00
|
|
|
}
|
|
|
|
Promise.resolve.call(NotPromise);
|
|
|
|
|
|
|
|
assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "prototype"), false);
|
2019-10-08 20:41:29 +02:00
|
|
|
assert.sameValue(isConstructor(executorFunction), false);
|