diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-04-07 15:39:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-07 15:39:59 +0800 |
commit | e3c9c22c757112327b83f598b124690baf13ac52 (patch) | |
tree | ef0f12fae9fedb217b2a0b7219f95bbc9fb6511e /test | |
parent | 0f4cd73dcc5d8a936ae3630a7992dbcb44274136 (diff) | |
download | tracifyjs-e3c9c22c757112327b83f598b124690baf13ac52.tar.gz tracifyjs-e3c9c22c757112327b83f598b124690baf13ac52.zip |
fix corner cases with `delete` (#1796)
`delete Infinity` returns `false` where as `delete (1/0)` returns `true`
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/evaluate.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index fa432c46..e660071d 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -857,3 +857,26 @@ issue_1760_2: { } expect_stdout: "Infinity" } + +delete_expr: { + options = { + evaluate: true, + } + input: { + console.log(delete undefined); + console.log(delete void 0); + console.log(delete Infinity); + console.log(delete (1 / 0)); + console.log(delete NaN); + console.log(delete (0 / 0)); + } + expect: { + console.log(delete undefined); + console.log(delete void 0); + console.log(delete Infinity); + console.log(delete (1 / 0)); + console.log(delete NaN); + console.log(delete (0 / 0)); + } + expect_stdout: true +} |