diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-12-02 15:25:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-02 15:25:38 +0800 |
commit | 500e31e03b69d3c6fa219a74f9131c2abc9c9730 (patch) | |
tree | 2523c58edce3d0abb8524bcb92b5218d1289825a /test/compress | |
parent | bef856addb7ac977b516a9bcd155c897a7d0dd99 (diff) | |
download | tracifyjs-500e31e03b69d3c6fa219a74f9131c2abc9c9730.tar.gz tracifyjs-500e31e03b69d3c6fa219a74f9131c2abc9c9730.zip |
enhance `collapse_vars` (#3621)
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/collapse_vars.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index 58325be1..cc6c5f9a 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -2578,6 +2578,23 @@ chained_3: { expect_stdout: "2" } +chained_4: { + options = { + collapse_vars: true, + } + input: { + var a = "foo", b = 42; + var b = void (b = a); + console.log(a, b); + } + expect: { + var a = "foo", b = 42; + var b = void (b = a); + console.log(a, b); + } + expect_stdout: "foo undefined" +} + boolean_binary_1: { options = { collapse_vars: true, |