aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-12-07 20:29:54 +0000
committerGitHub <noreply@github.com>2020-12-08 04:29:54 +0800
commit336336f53f7f1ba161abc7834da190504afeb27b (patch)
tree610d966c6909345e6904920fad4019ef8fa12e21 /test/compress
parent4bde50ce851b9f3c06be99e45e87185cee00ea55 (diff)
downloadtracifyjs-336336f53f7f1ba161abc7834da190504afeb27b.tar.gz
tracifyjs-336336f53f7f1ba161abc7834da190504afeb27b.zip
fix corner case with parentheses around `await` (#4344)
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/async.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/async.js b/test/compress/async.js
index cab1f92a..ca604034 100644
--- a/test/compress/async.js
+++ b/test/compress/async.js
@@ -306,3 +306,25 @@ issue_4340: {
expect_stdout: "PASS"
node_version: ">=8"
}
+
+call_expression: {
+ input: {
+ console.log(typeof async function(log) {
+ (await log)("FAIL");
+ }(console.log).then);
+ }
+ expect_exact: 'console.log(typeof async function(log){(await log)("FAIL")}(console.log).then);'
+ expect_stdout: "function"
+ node_version: ">=8"
+}
+
+property_access_expression: {
+ input: {
+ console.log(typeof async function(con) {
+ (await con).log("FAIL");
+ }(console).then);
+ }
+ expect_exact: 'console.log(typeof async function(con){(await con).log("FAIL")}(console).then);'
+ expect_stdout: "function"
+ node_version: ">=8"
+}