From 71a70fc11708278d2771325d82b0738a4ffc46f7 Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Tue, 8 Oct 2019 21:41:29 +0300 Subject: [PATCH] Use isConstructor in "executor-function-nonconstructor.js" (#2393) --- .../Promise/executor-function-nonconstructor.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/built-ins/Promise/executor-function-nonconstructor.js b/test/built-ins/Promise/executor-function-nonconstructor.js index e8686c60ed..6bf62de62e 100644 --- a/test/built-ins/Promise/executor-function-nonconstructor.js +++ b/test/built-ins/Promise/executor-function-nonconstructor.js @@ -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);