summaryrefslogtreecommitdiff
path: root/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js')
-rw-r--r--test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js b/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js
index 521f51311..d7b04c5db 100644
--- a/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js
+++ b/test/built-ins/AsyncFromSyncIteratorPrototype/throw/iterator-result-unwrap-promise.js
@@ -33,13 +33,13 @@ var obj = {
[Symbol.iterator]() {
return {
next() {
- return { value: 1, done: false };
+ return { value: 1, done: false };
},
throw() {
- return {
- value: Promise.resolve(42),
- done: true
- };
+ return {
+ value: Promise.resolve(42),
+ done: true
+ };
}
};
}
@@ -57,9 +57,9 @@ iter.next().then(function (result) {
assert.sameValue(result.value, 42, "Result.value should be unwrapped, got: " + result.value);
iter.next().then(({ done, value }) => {
- assert.sameValue(done, true, 'the iterator is completed');
- assert.sameValue(value, undefined, 'value is undefined');
+ assert.sameValue(done, true, 'the iterator is completed');
+ assert.sameValue(value, undefined, 'value is undefined');
}).then($DONE, $DONE);
}
).catch($DONE);
-}).then($DONE, $DONE);
+}).catch($DONE);