aboutsummaryrefslogtreecommitdiff
path: root/test/compress/objects.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-12-20 00:19:04 +0000
committerGitHub <noreply@github.com>2020-12-20 08:19:04 +0800
commitb7c49b72b3abd5da869d882a4e122cb155382874 (patch)
tree7488822884452643995370842eafc7fd23982e72 /test/compress/objects.js
parent8ce3c7d70fb476a65dc23f27bb5444ee89e59652 (diff)
downloadtracifyjs-b7c49b72b3abd5da869d882a4e122cb155382874.tar.gz
tracifyjs-b7c49b72b3abd5da869d882a4e122cb155382874.zip
support async function within object literal (#4424)
Diffstat (limited to 'test/compress/objects.js')
-rw-r--r--test/compress/objects.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/objects.js b/test/compress/objects.js
index d35f1538..67acefd6 100644
--- a/test/compress/objects.js
+++ b/test/compress/objects.js
@@ -257,6 +257,29 @@ keep_computed_key: {
node_version: ">=4"
}
+shorthand_keywords: {
+ options = {
+ evaluate: true,
+ reduce_vars: true,
+ toplevel: true,
+ unsafe: true,
+ unused: true,
+ }
+ input: {
+ var async = 1, get = 2, set = 3, o = {
+ async,
+ get,
+ set,
+ };
+ console.log(o.async, o.get, o.set);
+ }
+ expect: {
+ console.log(1, 2, 3);
+ }
+ expect_stdout: "1 2 3"
+ node_version: ">=6"
+}
+
issue_4269_1: {
options = {
evaluate: true,