blob: d45d063182380e519d83834115b83395ecd5a8e7 [file] [log] [blame]
keith_miller@apple.combcc77f22016-07-15 06:03:25 +00001// Copyright (C) 2015 André Bargull. All rights reserved.
2// This code is governed by the BSD license found in the LICENSE file.
3
4/*---
5es6id: 25.4.1.5.1
6description: GetCapabilitiesExecutor functions are not constructors
7info: >
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---*/
13
14var executorFunction;
15function NotPromise(executor) {
16 executorFunction = executor;
17 executor(function(){}, function(){});
18}
19Promise.resolve.call(NotPromise);
20
21assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "prototype"), false);
22assert.throws(TypeError, function() { new executorFunction(); });