diff options
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/awaits.js | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/compress/awaits.js b/test/compress/awaits.js index 9b4d8ba7..adfc9e4a 100644 --- a/test/compress/awaits.js +++ b/test/compress/awaits.js @@ -1869,3 +1869,49 @@ issue_5019_3: { ] node_version: ">=8" } + +issue_5023_1: { + options = { + awaits: true, + reduce_vars: true, + side_effects: true, + } + input: { + (async function() { + let a = a; + })(); + console.log("PASS"); + } + expect: { + (async function() { + let a = a; + })(); + console.log("PASS"); + } + expect_stdout: "PASS" + node_version: ">=8" +} + +issue_5023_2: { + options = { + awaits: true, + reduce_vars: true, + side_effects: true, + } + input: { + (async function() { + let a; + a = a; + })(); + console.log("PASS"); + } + expect: { + (function() { + let a; + a = a; + })(); + console.log("PASS"); + } + expect_stdout: "PASS" + node_version: ">=8" +} |