mirror of https://github.com/tc39/test262.git
Use isConstructor in "executor-function-nonconstructor.js" (#2393)
This commit is contained in:
parent
34cbf0aed2
commit
71a70fc117
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue