Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Promise/all/resolve-element-function-extensible.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.4.1.2
6 description: The [[Extensible]] slot of Promise.all Resolve Element functions
7 info: |
8 17 ECMAScript Standard Built-in Objects:
9 Unless specified otherwise, the [[Extensible]] internal slot
10 of a built-in object initially has the value true.
11 ---*/
12
13 var resolveElementFunction;
14 var thenable = {
15 then: function(fulfill) {
16 resolveElementFunction = fulfill;
17 }
18 };
19
20 function NotPromise(executor) {
21 executor(function() {}, function() {});
22 }
23 NotPromise.resolve = function(v) {
24 return v;
25 };
26 Promise.all.call(NotPromise, [thenable]);
27
28 assert(Object.isExtensible(resolveElementFunction));