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

@@ -505,6 +505,24 @@ drop_fargs: {
node_version: ">=6"
}
hoist_vars: {
options = {
hoist_vars: true,
}
input: {
var a = "PASS";
var [ b = 42 ] = [];
console.log(a, b);
}
expect: {
var a = "PASS";
var [ b = 42 ] = [];
console.log(a, b);
}
expect_stdout: "PASS 42"
node_version: ">=6"
}
unused_var_1: {
options = {
toplevel: true,