enhance side_effects (#4638)

This commit is contained in:
Alex Lam S.L
2021-02-10 10:09:54 +00:00
committed by GitHub
parent 5ec82e5801
commit a98ec7e4df
3 changed files with 77 additions and 3 deletions

View File

@@ -456,6 +456,7 @@ collapse_property_lambda: {
drop_return: {
options = {
arrows: true,
side_effects: true,
}
input: {
@@ -474,6 +475,21 @@ drop_return: {
node_version: ">=4"
}
drop_value: {
options = {
arrows: true,
side_effects: true,
}
input: {
((a, b) => a + b)(console.log(42));
}
expect: {
((a, b) => {})(console.log(42));
}
expect_stdout: "42"
node_version: ">=4"
}
reduce_iife_1: {
options = {
evaluate: true,