mirror of
https://github.com/tc39/test262.git
synced 2025-07-20 20:44:43 +02:00
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.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
es6id: 25.4.1.5.1
|
esid: sec-getcapabilitiesexecutor-functions
|
||||||
description: GetCapabilitiesExecutor functions are not constructors
|
description: GetCapabilitiesExecutor function is not constructor
|
||||||
info: |
|
info: |
|
||||||
17 ECMAScript Standard Built-in Objects:
|
17 ECMAScript Standard Built-in Objects:
|
||||||
Built-in function objects that are not identified as constructors do not
|
Built-in function objects that are not identified as constructors do not
|
||||||
implement the [[Construct]] internal method unless otherwise specified
|
implement the [[Construct]] internal method unless otherwise specified
|
||||||
in the description of a particular function.
|
in the description of a particular function.
|
||||||
|
includes: [isConstructor.js]
|
||||||
|
features: [Reflect.construct]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var executorFunction;
|
var executorFunction;
|
||||||
@ -20,6 +22,4 @@ function NotPromise(executor) {
|
|||||||
Promise.resolve.call(NotPromise);
|
Promise.resolve.call(NotPromise);
|
||||||
|
|
||||||
assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "prototype"), false);
|
assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "prototype"), false);
|
||||||
assert.throws(TypeError, function() {
|
assert.sameValue(isConstructor(executorFunction), false);
|
||||||
new executorFunction();
|
|
||||||
});
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user