Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Promise/all/S25.4.4.1_A2.3_T3.js

raw
1 // Copyright 2014 Cubane Canada, Inc. All rights reserved.
2 // See LICENSE for details.
3
4 /*---
5 info: Promise.all([]) is resolved with Promise for a new empty array
6 es6id: 25.4.4.1_A2.3_T3
7 author: Sam Mikes
8 description: Promise.all([]) is resolved with a Promise for a new array
9 flags: [async]
10 ---*/
11
12 var arg = [];
13
14 Promise.all(arg).then(function(result) {
15 if (result === arg) {
16 $ERROR("expected a new array from Promise.all but argument was re-used");
17 }
18 }).then($DONE, $DONE);