fix corner case in awaits & side_effects (#5072)

fixes #5070
This commit is contained in:
Alex Lam S.L
2021-07-11 06:43:08 +01:00
committed by GitHub
parent 08391b8e1c
commit 64ebf6efe9
2 changed files with 24 additions and 0 deletions

View File

@@ -2023,3 +2023,26 @@ issue_5034: {
expect_stdout: "PASS"
node_version: ">=8"
}
issue_5070: {
options = {
awaits: true,
side_effects: true,
}
input: {
(async function() {
try {
for await (var a of console.log("PASS"));
} catch (e) {}
})();
}
expect: {
(async function() {
try {
for await (var a of console.log("PASS"));
} catch (e) {}
})();
}
expect_stdout: "PASS"
node_version: ">=10"
}