Debian Codegraph @

js/src/tests/test262/language/expressions/async-arrow-function/try-throw-finally-throw.js

raw
1 // |reftest| async
2 // Copyright 2017 Caitlin Potter. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 author: Caitlin Potter <[email protected]>
7 esid: pending
8 description: >
9 Implementations must defer rejecting an async function's Promise until after
10 all finally blocks have been evaluated.
11 flags: [async]
12 ---*/
13
14 var f = async() => {
15 try {
16 throw "early-throw";
17 } finally {
18 throw "override";
19 }
20 };
21
22 f().then($DONE, function(value) {
23 assert.sameValue(value, "override", "Exception thrown in finally block");
24 }).then($DONE, $DONE);