diff --git a/test/built-ins/AsyncFromSyncIteratorPrototype/next/absent-value-not-passed.js b/test/built-ins/AsyncFromSyncIteratorPrototype/next/absent-value-not-passed.js index da642ca873e..27ed797b2da 100644 --- a/test/built-ins/AsyncFromSyncIteratorPrototype/next/absent-value-not-passed.js +++ b/test/built-ins/AsyncFromSyncIteratorPrototype/next/absent-value-not-passed.js @@ -29,10 +29,8 @@ var syncIterator = { }, }; -var asyncIterator = (async function* () { - yield* syncIterator; -})(); +(async function () { + for await (let _ of syncIterator); -asyncIterator.next().then(function() { assert.sameValue(nextArgumentsLength, 0); -}).then($DONE, $DONE); +})().then($DONE, $DONE); diff --git a/test/built-ins/AsyncFromSyncIteratorPrototype/return/absent-value-not-passed.js b/test/built-ins/AsyncFromSyncIteratorPrototype/return/absent-value-not-passed.js index 7772a8e1790..e654d5e74d3 100644 --- a/test/built-ins/AsyncFromSyncIteratorPrototype/return/absent-value-not-passed.js +++ b/test/built-ins/AsyncFromSyncIteratorPrototype/return/absent-value-not-passed.js @@ -32,12 +32,10 @@ var syncIterator = { }, }; -var asyncIterator = (async function* () { - yield* syncIterator; -})(); +(async function () { + for await (let _ of syncIterator) { + break; + } -asyncIterator.next().then(function() { - return asyncIterator.return(); -}).then(function() { assert.sameValue(returnArgumentsLength, 0); -}).then($DONE, $DONE); +})().then($DONE, $DONE); diff --git a/test/built-ins/AsyncFromSyncIteratorPrototype/throw/absent-value-not-passed.js b/test/built-ins/AsyncFromSyncIteratorPrototype/throw/absent-value-not-passed.js deleted file mode 100644 index b713c4d3fa5..00000000000 --- a/test/built-ins/AsyncFromSyncIteratorPrototype/throw/absent-value-not-passed.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2020 Alexey Shvayka. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-%asyncfromsynciteratorprototype%.throw -description: > - `throw` method does not pass absent `value`. -info: | - %AsyncFromSyncIteratorPrototype%.throw ( value ) - - [...] - 8. If value is present, then - [...] - 9. Else, - a. Let result be Call(throw, syncIterator). - [...] -flags: [async] -features: [async-iteration] ----*/ - -var throwArgumentsLength; -var syncIterator = { - [Symbol.iterator]() { - return this; - }, - next() { - return {done: false}; - }, - throw() { - throwArgumentsLength = arguments.length; - return {done: true}; - }, -}; - -var asyncIterator = (async function* () { - yield* syncIterator; -})(); - -asyncIterator.next().then(function() { - return asyncIterator.throw(); -}).then(function(result) { - throw new Test262Error("Promise should be rejected, got: " + result.value); -}, function() { - assert.sameValue(throwArgumentsLength, 0); -}).then($DONE, $DONE);