async arrow function IIFE fix (#2184)

fixes #2183
This commit is contained in:
kzc
2017-06-29 22:12:42 -04:00
committed by Alex Lam S.L
parent 07a5a57336
commit a938fe5e1f
3 changed files with 30 additions and 6 deletions

View File

@@ -268,3 +268,27 @@ async_arrow_wait: {
}
expect_exact: "var a=async(x,y)=>await x(y);"
}
async_arrow_iife: {
input: {
(async () => {
await fetch({});
})();
}
expect_exact: "(async()=>{await fetch({})})();"
}
async_arrow_iife_negate_iife: {
options = {
negate_iife: true,
}
input: {
(async () => {
await fetch();
})();
(() => {
plain();
})();
}
expect_exact: "(async()=>{await fetch()})();(()=>{plain()})();"
}