diff options
Diffstat (limited to 'test/js/async_try_catch_expression.t.js')
-rw-r--r-- | test/js/async_try_catch_expression.t.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/js/async_try_catch_expression.t.js b/test/js/async_try_catch_expression.t.js new file mode 100644 index 00000000..58d04203 --- /dev/null +++ b/test/js/async_try_catch_expression.t.js @@ -0,0 +1,28 @@ +/*--- +includes: [compareArray.js] +flags: [async] +---*/ + +let stages = []; + +async function af() { + try { + await ({}).a.a(); + + $DONOTEVALUATE(); + } + catch (v) { + stages.push('catch'); + } + finally { + stages.push('finally'); + } + + return "end"; +}; + +af().then(v => { + stages.push(v); + assert.compareArray(stages, ['catch', 'finally', 'end']); +}) +.then($DONE, $DONE) |