diff --git a/src/async-generators/yield-promise-reject-next-yield-star-async-iterator.case b/src/async-generators/yield-promise-reject-next-yield-star-async-iterator.case index 5239f6068b..5e1f5e1bfa 100644 --- a/src/async-generators/yield-promise-reject-next-yield-star-async-iterator.case +++ b/src/async-generators/yield-promise-reject-next-yield-star-async-iterator.case @@ -28,4 +28,4 @@ iter.next().then(() => { assert.sameValue(done, true, "The value of IteratorResult.done is `true`"); assert.sameValue(value, undefined, "The value of IteratorResult.value is `undefined`"); }).then($DONE, $DONE); -}).then($DONE, $DONE); +}, $DONE).catch($DONE); diff --git a/src/dstr-assignment-for-await/array-elem-iter-rtrn-close-null.case b/src/dstr-assignment-for-await/array-elem-iter-rtrn-close-null.case index ff7953160a..93d4c0402a 100644 --- a/src/dstr-assignment-for-await/array-elem-iter-rtrn-close-null.case +++ b/src/dstr-assignment-for-await/array-elem-iter-rtrn-close-null.case @@ -4,6 +4,12 @@ desc: > IteratorClose throws a TypeError when `return` returns a non-Object value info: | + AssignmentElement : DestructuringAssignmentTarget Initializer + 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then + a. Let lref be the result of evaluating DestructuringAssignmentTarget. + b. ReturnIfAbrupt(lref). + [...] + ArrayAssignmentPattern : [ AssignmentElementList ] [...] @@ -43,7 +49,12 @@ iterable //- body unreachable += 1; //- teardown -iter.next().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { - assert.sameValue(unreachable, 0); - assert.sameValue(constructor, TypeError); -}).then($DONE, $DONE); +iter.next().then(result => { + assert.sameValue(result.value, undefined); + assert.sameValue(result.done, false); + + iter.return().then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { + assert.sameValue(unreachable, 0); + assert.sameValue(constructor, TypeError); + }).then($DONE, $DONE); +}, $DONE).catch($DONE); diff --git a/src/dstr-assignment-for-await/array-elem-put-const.case b/src/dstr-assignment-for-await/array-elem-put-const.case index 60709de651..8b4236b8d1 100644 --- a/src/dstr-assignment-for-await/array-elem-put-const.case +++ b/src/dstr-assignment-for-await/array-elem-put-const.case @@ -15,3 +15,8 @@ const c = null; [ c ] //- vals [1] +//- teardown +promise.then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { + assert.sameValue(iterCount, 0); + assert.sameValue(constructor, TypeError); +}).then($DONE, $DONE); diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-elision-iter-nrml-close-null.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-elision-iter-nrml-close-null.case index 5b831a9de4..5d7e81a805 100644 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-elision-iter-nrml-close-null.case +++ b/src/dstr-assignment-for-await/array-elem-trlg-iter-elision-iter-nrml-close-null.case @@ -57,3 +57,9 @@ TypeError [ x , , ] //- vals iterable +//- teardown +promise.then(() => $DONE('Promise incorrectly fulfilled.'), ({ constructor }) => { + assert.sameValue(iterCount, 0); + assert.sameValue(nextCount, 2); + assert.sameValue(constructor, TypeError); +}).then($DONE, $DONE); diff --git a/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-nrml-close-skip.case b/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-nrml-close-skip.case index 892f618f8b..9ffd6a557d 100644 --- a/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-nrml-close-skip.case +++ b/src/dstr-assignment-for-await/array-elem-trlg-iter-rest-nrml-close-skip.case @@ -52,4 +52,4 @@ iter.next().then(() => { assert.sameValue(x, 1, 'x'); assert.sameValue(y.length, 0, 'y.length'); }).then($DONE, $DONE); -}).then($DONE, $DONE); +}, $DONE).catch($DONE);