Fix negate_iife transform to return a correct tree for nested IIFEs

Fix for #1256, partially reverts d854523783
This commit is contained in:
Richard van Velzen
2016-08-17 11:43:50 +02:00
parent 614db97cca
commit 8430123e9d
4 changed files with 29 additions and 3 deletions

View File

@@ -158,3 +158,17 @@ issue_1254_negate_iife_true: {
}
expect_exact: '!function(){return function(){console.log("test")}}()();'
}
issue_1254_negate_iife_nested: {
options = {
negate_iife: true,
}
input: {
(function() {
return function() {
console.log('test')
};
})()()()()();
}
expect_exact: '!function(){return function(){console.log("test")}}()()()()();'
}