tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S25.4.4.3_A2.2_T2.js (626B)


      1 // |reftest| async
      2 // Copyright 2014 Cubane Canada, Inc.  All rights reserved.
      3 // See LICENSE for details.
      4 
      5 /*---
      6 info: Promise.race rejects on non-iterable argument
      7 es6id: S25.4.4.3_A2.2_T2
      8 author: Sam Mikes
      9 description: Promise.race rejects if argument is not object or is non-iterable
     10 flags: [async]
     11 ---*/
     12 
     13 Promise.race(new Error("abrupt")).then(function() {
     14  throw new Test262Error('Promise unexpectedly resolved: Promise.race(abruptCompletion) should throw TypeError');
     15 }, function(err) {
     16  assert(!!(err instanceof TypeError), 'The value of !!(err instanceof TypeError) is expected to be true');
     17 }).then($DONE, $DONE);