diff options
author | Richard van Velzen <rvanvelzen@experty.com> | 2016-10-06 14:11:19 +0200 |
---|---|---|
committer | Richard van Velzen <rvanvelzen@experty.com> | 2016-10-06 14:11:32 +0200 |
commit | 6389e52305f0d2e75a7bc6f8703c8d163d04cb99 (patch) | |
tree | 68775007b6a5bc963278edff6434d25384c3fb67 | |
parent | e05510f3bce78943f76649a4102c2f10bfccdaef (diff) | |
download | tracifyjs-6389e52305f0d2e75a7bc6f8703c8d163d04cb99.tar.gz tracifyjs-6389e52305f0d2e75a7bc6f8703c8d163d04cb99.zip |
Remove console.log and add extra test case
-rw-r--r-- | lib/output.js | 1 | ||||
-rw-r--r-- | test/compress/wrap_iife.js | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js index c20a0365..014dac46 100644 --- a/lib/output.js +++ b/lib/output.js @@ -559,7 +559,6 @@ function OutputStream(options) { if (output.option('wrap_iife')) { var p = output.parent(); - console.log() return p instanceof AST_Call && p.expression === this; } diff --git a/test/compress/wrap_iife.js b/test/compress/wrap_iife.js index b1b88ac1..5c45853a 100644 --- a/test/compress/wrap_iife.js +++ b/test/compress/wrap_iife.js @@ -15,6 +15,21 @@ wrap_iife: { expect_exact: '(function(){return function(){console.log("test")}})()();' } +wrap_iife_in_expression: { + options = { + negate_iife: false, + } + beautify = { + wrap_iife: true, + } + input: { + foo = (function () { + return bar(); + })(); + } + expect_exact: 'foo=(function(){return bar()})();' +} + wrap_iife_in_return_call: { options = { negate_iife: false, |