aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-03-01 20:34:31 +0000
committerGitHub <noreply@github.com>2020-03-01 20:34:31 +0000
commita051846d2275de75c72b69063a6b75ee0d302a8c (patch)
tree299681728a31b4214857a627d476928377859939 /test/compress
parent348547286611eaf665b00d5ee21a8fee2c2f0660 (diff)
downloadtracifyjs-a051846d2275de75c72b69063a6b75ee0d302a8c.tar.gz
tracifyjs-a051846d2275de75c72b69063a6b75ee0d302a8c.zip
fix corner case in `evaluate` (#3739)
fixes #3738
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/evaluate.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js
index 09fdfb2a..6d3adacb 100644
--- a/test/compress/evaluate.js
+++ b/test/compress/evaluate.js
@@ -2161,3 +2161,16 @@ collapse_vars_regexp: {
"abbb",
]
}
+
+issue_3738: {
+ options = {
+ evaluate: true,
+ }
+ input: {
+ console.log(1 / (0 + ([] - 1) % 1));
+ }
+ expect: {
+ console.log(1 / (0 + ([] - 1) % 1));
+ }
+ expect_stdout: "Infinity"
+}