diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/comparisons.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/compress/comparisons.js b/test/compress/comparisons.js index 434f09c9..46805625 100644 --- a/test/compress/comparisons.js +++ b/test/compress/comparisons.js @@ -345,3 +345,23 @@ is_boolean_var: { } expect_stdout: "1" } + +is_defined: { + options = { + comparisons: true, + } + input: { + console.log(function a() { + return void 0 === a; + }()); + } + expect: { + console.log(function a() { + return a, false; + }()); + } + expect_stdout: "false" + expect_warnings: [ + "WARN: Expression always defined [test/compress/comparisons.js:2,19]", + ] +} |