diff options
Diffstat (limited to 'test/mocha/reduce.js')
-rw-r--r-- | test/mocha/reduce.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/mocha/reduce.js b/test/mocha/reduce.js index 7e2d4601..c06efd67 100644 --- a/test/mocha/reduce.js +++ b/test/mocha/reduce.js @@ -313,4 +313,12 @@ describe("test/reduce.js", function() { if (result.error) throw result.error; assert.strictEqual(result.code, read("test/input/reduce/diff_error.reduced.js")); }); + it("Should handle destructured catch expressions", function() { + if (semver.satisfies(process.version, "<6")) return; + var result = reduce_test(read("test/input/reduce/destructured_catch.js"), { + mangle: false, + }); + if (result.error) throw result.error; + assert.strictEqual(result.code, read("test/input/reduce/destructured_catch.reduced.js")); + }); }); |