support asynchronous arrow functions (#4530)

This commit is contained in:
Alex Lam S.L
2021-01-10 03:34:26 +00:00
committed by GitHub
parent 0818d396c5
commit ba54d074d8
10 changed files with 159 additions and 56 deletions

View File

@@ -1,3 +1,27 @@
async_arrow: {
input: {
(async a => console.log(a))("PASS");
console.log(typeof (async () => 42)());
}
expect_exact: '(async a=>console.log(a))("PASS");console.log(typeof(async()=>42)());'
expect_stdout: [
"PASS",
"object",
]
node_version: ">=8"
}
async_label: {
input: {
(async function() {
async: console.log("PASS");
})();
}
expect_exact: '(async function(){async:console.log("PASS")})();'
expect_stdout: "PASS"
node_version: ">=8"
}
await_await: {
input: {
(async function() {