We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e25767 commit 1afe73bCopy full SHA for 1afe73b
test/unit/error.spec.ts
@@ -258,20 +258,23 @@ test("multi return from catch->finally", () => {
258
259
test("throw propagates through finally to outer catch", () => {
260
util.testFunction`
261
- function test() {
+ function thrower() {
262
try {
263
- throw "Test error";
+ throw "Error";
264
} finally {
265
}
266
267
268
- let result = 0;
269
- try {
270
- test();
271
- } catch (e) {
272
- result += 1;
+ function caller() {
+ try {
+ thrower();
+ return "NoCatch";
+ } catch (e) {
273
+ return e;
274
+ }
275
- return result;
276
+
277
+ return caller();
278
`.expectToMatchJsResult();
279
});
280
0 commit comments