From 5742b713746accacfcf4dfae1cb67bcefcc6d43a Mon Sep 17 00:00:00 2001 From: Jordan Gensler Date: Tue, 26 Sep 2017 13:17:44 -0700 Subject: [PATCH] Adding optionalCatchBinding to plugins. (#521) --- index.js | 1 + test/non-regression.js | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/index.js b/index.js index 79eb5a3c..ed1b8ff3 100644 --- a/index.js +++ b/index.js @@ -414,6 +414,7 @@ exports.parseNoPatch = function(code, options) { "importMeta", "classPrivateProperties", "bigInt", + "optionalCatchBinding", ], }; diff --git a/test/non-regression.js b/test/non-regression.js index 72f4ae07..4161af03 100644 --- a/test/non-regression.js +++ b/test/non-regression.js @@ -1845,4 +1845,15 @@ describe("verify", () => { [] ); }); + + it("works with optionalCatchBinding", () => { + verifyAndAssertMessages( + unpad(` + try {} catch {} + try {} catch {} finally {} + `), + {}, + [] + ); + }); });