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/destructured.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/destructured.js')
-rw-r--r-- | test/compress/destructured.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js index 98e84f48..ba7dbf3c 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -1358,6 +1358,24 @@ fn_name_unused: { 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" +} + issue_4280: { options = { evaluate: true, |