diff options
Diffstat (limited to 'test/compress/awaits.js')
-rw-r--r-- | test/compress/awaits.js | 77 |
1 files changed, 76 insertions, 1 deletions
diff --git a/test/compress/awaits.js b/test/compress/awaits.js index 937fcb5a..be3cc5a0 100644 --- a/test/compress/awaits.js +++ b/test/compress/awaits.js @@ -564,7 +564,7 @@ drop_return: { input: { (async function(a) { while (!console); - return console.log(a); + return !console.log(a); })(42); } expect: { @@ -1408,3 +1408,78 @@ issue_4747: { expect_stdout: "PASS" node_version: ">=8" } + +issue_4764_1: { + options = { + side_effects: true, + } + input: { + (async function() { + return { + then() { + console.log("PASS"); + }, + }; + })(); + } + expect: { + (async function() { + return { + then() { + console.log("PASS"); + }, + }; + })(); + } + expect_stdout: "PASS" + node_version: ">=8" +} + +issue_4764_2: { + options = { + arrows: true, + side_effects: true, + } + input: { + (async () => ({ + get then() { + console.log("PASS"); + }, + }))(); + } + expect: { + (async () => ({ + get then() { + console.log("PASS"); + }, + }))(); + } + expect_stdout: "PASS" + node_version: ">=8" +} + +issue_4764_3: { + options = { + side_effects: true, + } + input: { + (async function(o) { + return o; + })({ + then() { + console.log("PASS"); + }, + }); + } + expect: { + (async function(o) { + return o; + })({ + then() { + console.log("PASS"); + }, + }); + } + expect_stdout: "PASS" + node_version: ">=8" +} |