diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-28 22:17:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 06:17:52 +0800 |
commit | ddc0ed7072ed460f0121a700a6e7fde8fe28400a (patch) | |
tree | f58a7dda828f35b13124224f0236991c52e563e8 /test/compress/default-values.js | |
parent | c00efe56f4fb07d27eb1d47915288b027b3ef692 (diff) | |
download | tracifyjs-ddc0ed7072ed460f0121a700a6e7fde8fe28400a.tar.gz tracifyjs-ddc0ed7072ed460f0121a700a6e7fde8fe28400a.zip |
expand test options (#4475)
- fix corner cases in `hoist_vars` & `keep_fnames`
Diffstat (limited to 'test/compress/default-values.js')
-rw-r--r-- | test/compress/default-values.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/compress/default-values.js b/test/compress/default-values.js index acd285f4..39fcddbd 100644 --- a/test/compress/default-values.js +++ b/test/compress/default-values.js @@ -505,6 +505,24 @@ drop_fargs: { node_version: ">=6" } +hoist_vars: { + options = { + hoist_vars: true, + } + input: { + var a = "PASS"; + var [ b = 42 ] = []; + console.log(a, b); + } + expect: { + var a = "PASS"; + var [ b = 42 ] = []; + console.log(a, b); + } + expect_stdout: "PASS 42" + node_version: ">=6" +} + unused_var_1: { options = { toplevel: true, |