aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-02-25 02:14:33 +0800
committerGitHub <noreply@github.com>2018-02-25 02:14:33 +0800
commit52de64cf16a323797b11fb6fa286f0016be9a7a5 (patch)
tree3bad188b7e59aac90d38bfc9a843997e8a33f894 /test
parent455790202a50e861573df118b9f9d536b6d23db4 (diff)
downloadtracifyjs-52de64cf16a323797b11fb6fa286f0016be9a7a5.tar.gz
tracifyjs-52de64cf16a323797b11fb6fa286f0016be9a7a5.zip
deduplicate parenthesis around object and function literals (#2953)
Diffstat (limited to 'test')
-rw-r--r--test/compress/functions.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index 29c438ae..5d0be0f9 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -2012,3 +2012,13 @@ issue_2898: {
}
expect_stdout: "2"
}
+
+deduplicate_parenthesis: {
+ input: {
+ ({}).a = b;
+ (({}).a = b)();
+ (function() {}).a = b;
+ ((function() {}).a = b)();
+ }
+ expect_exact: "({}).a=b;({}.a=b)();(function(){}).a=b;(function(){}.a=b)();"
+}