suppress invalid AST transform in --reduce-test (#4498)
This commit is contained in:
@@ -307,6 +307,18 @@ 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 maintain valid LHS in destructuring assignments", function() {
|
||||
if (semver.satisfies(process.version, "<6")) return;
|
||||
var result = reduce_test(read("test/input/reduce/destructured_assign.js"), {
|
||||
compress: {
|
||||
unsafe_math: true,
|
||||
},
|
||||
mangle: false,
|
||||
validate: true,
|
||||
});
|
||||
if (result.error) throw result.error;
|
||||
assert.strictEqual(result.code, read("test/input/reduce/destructured_assign.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"), {
|
||||
|
||||
Reference in New Issue
Block a user