aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-02 11:33:59 +0800
committerGitHub <noreply@github.com>2017-03-02 11:33:59 +0800
commit9699ffb1afc8bead9fbc3643c6b90b14169ef02c (patch)
tree321a3ee8f7a868e9ec620b266824c0248914b826 /test
parentfdc9b9413bfddc711fe6195bd4fd408ab1dfa95e (diff)
downloadtracifyjs-9699ffb1afc8bead9fbc3643c6b90b14169ef02c.tar.gz
tracifyjs-9699ffb1afc8bead9fbc3643c6b90b14169ef02c.zip
trim unused invocation parameters (#1526)
Diffstat (limited to 'test')
-rw-r--r--test/compress/evaluate.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js
index f84436df..26b6e489 100644
--- a/test/compress/evaluate.js
+++ b/test/compress/evaluate.js
@@ -646,6 +646,29 @@ call_args: {
}
}
+call_args_drop_param: {
+ options = {
+ evaluate: true,
+ keep_fargs: false,
+ reduce_vars: true,
+ unused: true,
+ }
+ input: {
+ const a = 1;
+ console.log(a);
+ +function(a) {
+ return a;
+ }(a, b);
+ }
+ expect: {
+ const a = 1;
+ console.log(1);
+ +function() {
+ return 1;
+ }(b);
+ }
+}
+
in_boolean_context: {
options = {
booleans: true,