Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Promise/executor-function-name.js

raw
1 // Copyright (C) 2015 André Bargull. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es6id: 25.4.1.5.1
6 description: The `name` property of GetCapabilitiesExecutor functions
7 info: |
8 A GetCapabilitiesExecutor function is an anonymous built-in function.
9
10 17 ECMAScript Standard Built-in Objects:
11 Every built-in Function object, including constructors, that is not
12 identified as an anonymous function has a name property whose value
13 is a String.
14 ---*/
15
16 var executorFunction;
17
18 function NotPromise(executor) {
19 executorFunction = executor;
20 executor(function() {}, function() {});
21 }
22 Promise.resolve.call(NotPromise);
23
24 assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "name"), false);