tor-browser

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

S25.4.4.1_A3.1_T1.js (734B)


      1 // |reftest| async
      2 // Copyright 2014 Cubane Canada, Inc.  All rights reserved.
      3 // See LICENSE for details.
      4 
      5 /*---
      6 info: |
      7    Promise.all expects an iterable argument;
      8    ref 7.4.1 non-Object fails CheckIterable
      9    ref 7.4.2 GetIterator throws TypeError if CheckIterable fails
     10 es6id: 25.4.4.1_A3.1_T1
     11 author: Sam Mikes
     12 description: Promise.all(3) returns Promise rejected with TypeError
     13 flags: [async]
     14 ---*/
     15 
     16 var nonIterable = 3;
     17 
     18 Promise.all(nonIterable).then(function() {
     19  throw new Test262Error('Promise unexpectedly resolved: Promise.all(nonIterable) should throw TypeError');
     20 }, function(err) {
     21  assert(!!(err instanceof TypeError), 'The value of !!(err instanceof TypeError) is expected to be true');
     22 }).then($DONE, $DONE);