fix corner case with yield (#4867)

This commit is contained in:
Alex Lam S.L
2021-04-24 20:10:12 +01:00
committed by GitHub
parent c296a63fb3
commit a2b1b96752
2 changed files with 43 additions and 16 deletions

View File

@@ -150,6 +150,27 @@ for_await_of: {
node_version: ">=10"
}
comment_newline: {
beautify = {
comments: "all",
}
input: {
console.log(function*() {
yield (
/* */
"PASS"
);
}().next().value);
}
expect_exact: [
"console.log(function*(){",
"/* */",
'yield"PASS"}().next().value);',
]
expect_stdout: "PASS"
node_version: ">=4"
}
collapse_vars_1: {
options = {
collapse_vars: true,