expand test options (#4475)

- fix corner cases in `hoist_vars` & `keep_fnames`
This commit is contained in:
Alex Lam S.L
2020-12-28 22:17:52 +00:00
committed by GitHub
parent c00efe56f4
commit ddc0ed7072
7 changed files with 194 additions and 42 deletions

View File

@@ -32,6 +32,54 @@ defun_name: {
node_version: ">=8"
}
drop_fname: {
rename = true
options = {
reduce_vars: true,
toplevel: true,
unused: true,
}
mangle = {
toplevel: true,
}
input: {
async function await() {
console.log("PASS");
}
await();
}
expect: {
(async function() {
console.log("PASS");
})();
}
expect_stdout: "PASS"
node_version: ">=8"
}
keep_fname: {
options = {
keep_fnames: true,
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
async function await() {
console.log("PASS");
}
await();
}
expect: {
async function await() {
console.log("PASS");
}
await();
}
expect_stdout: "PASS"
node_version: ">=8"
}
nested_await: {
input: {
(async function() {