aboutsummaryrefslogtreecommitdiff
path: root/test/compress/collapse_vars.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-05-15 23:26:57 +0800
committerGitHub <noreply@github.com>2019-05-15 23:26:57 +0800
commita21c348d93fba14715ef8c1c597a26328cf1a947 (patch)
tree6f4b888001409622837e4342855fd0426141f72e /test/compress/collapse_vars.js
parent1f0def10ebc637ddd6c24094942ae616f94ed25f (diff)
downloadtracifyjs-a21c348d93fba14715ef8c1c597a26328cf1a947.tar.gz
tracifyjs-a21c348d93fba14715ef8c1c597a26328cf1a947.zip
improve sandbox fidelity (#3415)
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r--test/compress/collapse_vars.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js
index 1862687a..17835a89 100644
--- a/test/compress/collapse_vars.js
+++ b/test/compress/collapse_vars.js
@@ -6178,3 +6178,22 @@ assign_undeclared: {
"object",
]
}
+
+Infinity_assignment: {
+ options = {
+ collapse_vars: true,
+ pure_getters: "strict",
+ unsafe: true,
+ }
+ input: {
+ var Infinity;
+ Infinity = 42;
+ console.log(Infinity);
+ }
+ expect: {
+ var Infinity;
+ Infinity = 42;
+ console.log(Infinity);
+ }
+ expect_stdout: true
+}