Debian Codegraph @

js/src/tests/test262/built-ins/Promise/race/S25.4.4.3_A5.1_T1.js

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