improve usability of pure_funcs (#3336)

fixes #3325
This commit is contained in:
Alex Lam S.L
2019-03-14 21:36:45 +08:00
committed by GitHub
parent ebd82b3fb6
commit e49297e5eb
2 changed files with 47 additions and 3 deletions

View File

@@ -642,3 +642,41 @@ issue_3065_4: {
})();
}
}
issue_3325_1: {
options = {
pure_funcs: "cb",
side_effects: true,
}
input: {
function cb() {
console.log("PASS");
}
cb();
}
expect: {
function cb() {
console.log("PASS");
}
}
}
issue_3325_2: {
options = {
pure_funcs: "xxxcbxxx",
side_effects: true,
}
input: {
function cb() {
console.log("PASS");
}
cb();
}
expect: {
function cb() {
console.log("PASS");
}
cb();
}
expect_stdout: "PASS"
}