Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Promise/all/ctx-non-ctor.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: >
6 `Promise.all` invoked on a non-constructor value
7 es6id: 25.4.4.1
8 info: |
9 [...]
10 6. Let promiseCapability be NewPromiseCapability(C).
11 7. ReturnIfAbrupt(promiseCapability).
12
13 25.4.1.5 NewPromiseCapability ( C )
14
15 1. If IsConstructor(C) is false, throw a TypeError exception.
16 ---*/
17
18 assert.throws(TypeError, function() {
19 Promise.all.call(eval);
20 });