Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Array / fromAsync / asyncitems-asynciterator-throws.js
blob22c78f236ac3501ef13dcfdecc026dc72ab8584a
1 // |reftest| async
2 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-array.fromasync
7 description: >
8   Array.fromAsync rejects if getting the @@asyncIterator property throws
9 includes: [asyncHelpers.js]
10 flags: [async]
11 features: [Array.fromAsync]
12 ---*/
14 asyncTest(async function () {
15   await assert.throwsAsync(Test262Error,
16     () => Array.fromAsync({ get [Symbol.asyncIterator]() { throw new Test262Error() } }));
17 });