From e6ebf827ce8eaf75b0ad137aa19d09da2c03df46 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 27 Feb 2021 02:15:14 +0000 Subject: fix corner cases with `export` (#4699) fixes #4698 fixes #4700 fixes #4701 fixes #4702 --- test/compress/exports.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test/compress') 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"; -- cgit v1.2.3