diff options
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/wrap_iife.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/compress/wrap_iife.js b/test/compress/wrap_iife.js new file mode 100644 index 00000000..b1b88ac1 --- /dev/null +++ b/test/compress/wrap_iife.js @@ -0,0 +1,33 @@ +wrap_iife: { + options = { + negate_iife: false, + } + beautify = { + wrap_iife: true, + } + input: { + (function() { + return function() { + console.log('test') + }; + })()(); + } + expect_exact: '(function(){return function(){console.log("test")}})()();' +} + +wrap_iife_in_return_call: { + options = { + negate_iife: false, + } + beautify = { + wrap_iife: true, + } + input: { + (function() { + return (function() { + console.log('test') + })(); + })()(); + } + expect_exact: '(function(){return(function(){console.log("test")})()})()();' +} |