enhance pure_funcs (#4945)

This commit is contained in:
Alex Lam S.L
2021-05-20 00:09:47 +01:00
committed by GitHub
parent d6152e6a76
commit e0695ef549
2 changed files with 87 additions and 30 deletions

View File

@@ -315,6 +315,21 @@ unsafe_side_effects: {
node_version: ">=4"
}
pure_funcs: {
options = {
pure_funcs: "Math.random",
side_effects: true,
}
input: {
Math.random`${console.log("PASS")}`;
}
expect: {
console.log("PASS");
}
expect_stdout: "PASS"
node_version: ">=4"
}
issue_4604: {
options = {
collapse_vars: true,