aboutsummaryrefslogtreecommitdiff
path: root/test/compress/classes.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-03-17 01:28:27 +0000
committerGitHub <noreply@github.com>2021-03-17 09:28:27 +0800
commit997d09bb33f95cf414235b8fc3d3b0539d33d2a2 (patch)
treea851c195749d27ee14d5a536100dd58f048769a6 /test/compress/classes.js
parentb244b4ec21fdb65870068879f02e5471ab371d1d (diff)
downloadtracifyjs-997d09bb33f95cf414235b8fc3d3b0539d33d2a2.tar.gz
tracifyjs-997d09bb33f95cf414235b8fc3d3b0539d33d2a2.zip
extend `keep_fnames` to classes (#4793)
Diffstat (limited to 'test/compress/classes.js')
-rw-r--r--test/compress/classes.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/classes.js b/test/compress/classes.js
index cebccf95..46749a27 100644
--- a/test/compress/classes.js
+++ b/test/compress/classes.js
@@ -779,6 +779,27 @@ computed_key_generator: {
node_version: ">=4"
}
+keep_fnames: {
+ options = {
+ keep_fnames: true,
+ toplevel: true,
+ }
+ mangle = {
+ keep_fnames: true,
+ toplevel: true,
+ }
+ input: {
+ "use strict";
+ class Foo {}
+ console.log(Foo.name, class Bar {}.name);
+ }
+ expect: {
+ "use strict";
+ class Foo {}
+ console.log(Foo.name, class Bar {}.name);
+ }
+}
+
issue_805_1: {
options = {
inline: true,