Debian Codegraph @

js/src/tests/test262/built-ins/Promise/allSettled/resolve-element-function-extensible.js

raw
1 // Copyright (C) 2019 Leo Balter. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-promise.allsettled-resolve-element-functions
6 description: The [[Extensible]] slot of Promise.allSettled 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 features: [Promise.allSettled]
12 ---*/
13
14 var resolveElementFunction;
15 var thenable = {
16 then(fulfill) {
17 resolveElementFunction = fulfill;
18 }
19 };
20
21 function NotPromise(executor) {
22 executor(function() {}, function() {});
23 }
24 NotPromise.resolve = function(v) {
25 return v;
26 };
27 Promise.allSettled.call(NotPromise, [thenable]);
28
29 assert(Object.isExtensible(resolveElementFunction));
30
31 reportCompare(0, 0);