aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-03-02 04:08:08 +0000
committerGitHub <noreply@github.com>2021-03-02 12:08:08 +0800
commit62887f2c66491846ab5c08e348373bdad07ea9a2 (patch)
treec2f58f66262c85e2195eee6a167f9195f9a83709 /test/compress
parent68b2dadc58d649f3a917b602a66804ad50aae2ae (diff)
downloadtracifyjs-62887f2c66491846ab5c08e348373bdad07ea9a2.tar.gz
tracifyjs-62887f2c66491846ab5c08e348373bdad07ea9a2.zip
fix corner case with `class` (#4713)
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/classes.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/compress/classes.js b/test/compress/classes.js
index f94731fb..386e3725 100644
--- a/test/compress/classes.js
+++ b/test/compress/classes.js
@@ -82,6 +82,19 @@ fields: {
node_version: ">=12"
}
+modifier_as_field_name: {
+ input: {
+ for (var k in new class { async; static = 42 })
+ console.log(k);
+ }
+ expect_exact: "for(var k in new class{async;static=42})console.log(k);"
+ expect_stdout: [
+ "async",
+ "static",
+ ]
+ node_version: ">=12"
+}
+
methods: {
input: {
"use strict";