aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/spread.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/spread.js b/test/compress/spread.js
index 67aa549a..944915fe 100644
--- a/test/compress/spread.js
+++ b/test/compress/spread.js
@@ -85,6 +85,28 @@ collapse_vars_4: {
node_version: ">=6"
}
+conditionals_farg: {
+ options = {
+ conditionals: true,
+ }
+ input: {
+ function log(msg) {
+ console.log(msg);
+ }
+ var a = 42, b = [ "PASS" ], c = [ "FAIL" ];
+ a ? log(...b) : log(...c);
+ }
+ expect: {
+ function log(msg) {
+ console.log(msg);
+ }
+ var a = 42, b = [ "PASS" ], c = [ "FAIL" ];
+ log(...a ? b : c);
+ }
+ expect_stdout: "PASS"
+ node_version: ">=6"
+}
+
dont_inline: {
options = {
inline: true,