support async function within object literal (#4424)

This commit is contained in:
Alex Lam S.L
2020-12-20 00:19:04 +00:00
committed by GitHub
parent 8ce3c7d70f
commit b7c49b72b3
4 changed files with 85 additions and 19 deletions

View File

@@ -143,6 +143,27 @@ negate_iife: {
node_version: ">=8"
}
object_function: {
options = {
properties: true,
side_effects: true,
}
input: {
({
async f() {
console.log("PASS");
},
}).f();
}
expect: {
(async function() {
console.log("PASS");
})();
}
expect_stdout: "PASS"
node_version: ">=8"
}
collapse_vars_1: {
options = {
collapse_vars: true,