diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-02-27 02:15:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-27 10:15:14 +0800 |
commit | e6ebf827ce8eaf75b0ad137aa19d09da2c03df46 (patch) | |
tree | 5a7ea57681bcd5de18e465b3ed44b6e01631801f /test/compress | |
parent | 0a42457df64944187a069b26491fcebd8ce55ce0 (diff) | |
download | tracifyjs-e6ebf827ce8eaf75b0ad137aa19d09da2c03df46.tar.gz tracifyjs-e6ebf827ce8eaf75b0ad137aa19d09da2c03df46.zip |
fix corner cases with `export` (#4699)
fixes #4698
fixes #4700
fixes #4701
fixes #4702
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/exports.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/exports.js b/test/compress/exports.js index c573223d..2da1ee33 100644 --- a/test/compress/exports.js +++ b/test/compress/exports.js @@ -70,6 +70,27 @@ defaults_parentheses_4: { expect_exact: "export default(function f(){});" } +defaults_parentheses_5: { + input: { + export default (function(a) { + console.log(a[0]); + }`PASS`); + } + expect_exact: "export default(function(a){console.log(a[0])})`PASS`;" +} + +defaults_parentheses_6: { + options = { + conditionals: true, + } + input: { + export default !function() { + while (!console); + }() ? "PASS" : "FAIL"; + } + expect_exact: 'export default(function(){while(!console);})()?"FAIL":"PASS";' +} + foreign: { input: { export * from "foo"; |