Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Promise/race/S25.4.4.3_A5.1_T1.js

raw
1 // Copyright 2014 Cubane Canada, Inc. All rights reserved.
2 // See LICENSE for details.
3
4 /*---
5 es6id: S25.4.4.3_A5.1_T1
6 author: Sam Mikes
7 description: Promise.race([]) never settles
8 flags: [async]
9 ---*/
10
11 var p = Promise.race([]);
12
13 p.then(function() {
14 $ERROR("Never settles.");
15 }, function() {
16 $ERROR("Never settles.");
17 }).then($DONE, $DONE);
18
19 // use three 'then's to allow above to settle
20 // if this is a buggy Promise.race implementation
21 Promise.resolve().then().then().then($DONE, $DONE);