aboutsummaryrefslogtreecommitdiff
path: root/test/compress/issue-22.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/issue-22.js')
-rw-r--r--test/compress/issue-22.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/compress/issue-22.js b/test/compress/issue-22.js
new file mode 100644
index 00000000..a8b7bc60
--- /dev/null
+++ b/test/compress/issue-22.js
@@ -0,0 +1,17 @@
+return_with_no_value_in_if_body: {
+ options = { conditionals: true };
+ input: {
+ function foo(bar) {
+ if (bar) {
+ return;
+ } else {
+ return 1;
+ }
+ }
+ }
+ expect: {
+ function foo (bar) {
+ return bar ? void 0 : 1;
+ }
+ }
+}