aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-02 04:39:51 +0000
committerGitHub <noreply@github.com>2021-01-02 12:39:51 +0800
commitb3a706114ce775f75c4a6da37bff4a8ef32415d5 (patch)
tree2f4546ba7fbb3788eb06f1d5f6bfac6d2dace7ce /test/compress
parentcc2d7acaf0ed2479c8d3a5d3cbbce15a3cb2333b (diff)
downloadtracifyjs-b3a706114ce775f75c4a6da37bff4a8ef32415d5.tar.gz
tracifyjs-b3a706114ce775f75c4a6da37bff4a8ef32415d5.zip
enhance `if_return` & `side_effects` (#4494)
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/async.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/test/compress/async.js b/test/compress/async.js
index 51aba26c..4039dbb1 100644
--- a/test/compress/async.js
+++ b/test/compress/async.js
@@ -184,7 +184,7 @@ inline_await_1_trim: {
}
expect: {
(async function() {
- await 42;
+ await 0;
})();
console.log("PASS");
}
@@ -228,7 +228,7 @@ inline_await_2_trim: {
input: {
(async function() {
async function f(a) {
- await a;
+ await a.log;
}
return await f(console);
})();
@@ -236,7 +236,7 @@ inline_await_2_trim: {
}
expect: {
(async function() {
- await console;
+ await console.log;
})();
console.log("PASS");
}
@@ -299,18 +299,22 @@ await_unary: {
side_effects: true,
}
input: {
+ var a;
(async function() {
- console.log("PASS");
- await +[];
- console.log("FAIL");
+ a = "PASS";
+ await delete a.p;
+ a = "FAIL";
})();
+ console.log(a);
}
expect: {
+ var a;
(async function() {
- console.log("PASS");
- await +[];
- console.log("FAIL");
+ a = "PASS";
+ await delete a.p;
+ a = "FAIL";
})();
+ console.log(a);
}
expect_stdout: "PASS"
node_version: ">=8"