aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-04-24 20:10:12 +0100
committerGitHub <noreply@github.com>2021-04-25 03:10:12 +0800
commita2b1b96752c5f898539f8e28431461428c4c7731 (patch)
treee386a4678032777ef863de556f69426b51fb4a00 /test
parentc296a63fb338a6edba6682d821351255e8935fd9 (diff)
downloadtracifyjs-a2b1b96752c5f898539f8e28431461428c4c7731.tar.gz
tracifyjs-a2b1b96752c5f898539f8e28431461428c4c7731.zip
fix corner case with `yield` (#4867)
Diffstat (limited to 'test')
-rw-r--r--test/compress/yields.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/yields.js b/test/compress/yields.js
index d21ebcbf..d577d7ef 100644
--- a/test/compress/yields.js
+++ b/test/compress/yields.js
@@ -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,