tor-browser

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

non-iterable-input-element-access-err.js (546B)


      1 // |reftest| async
      2 // Copyright (C) 2023 Igalia, S.L. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-array.fromasync
      7 description: Result promise rejects if element access fails
      8 includes: [asyncHelpers.js]
      9 flags: [async]
     10 features: [Array.fromAsync]
     11 ---*/
     12 
     13 asyncTest(async function () {
     14  const input = {
     15    length: 1,
     16    get 0 () {
     17      throw new Test262Error;
     18    },
     19  };
     20  const outputPromise = Array.fromAsync(input);
     21  assert.throwsAsync(Test262Error, () => outputPromise);
     22 });