improve usability of global_defs in minify() (#1987)

Use `@key` to `parse()` string value as `AST_Node`.

fixes #1986
This commit is contained in:
Alex Lam S.L
2017-05-22 01:38:43 +08:00
committed by GitHub
parent a1dedeb3ce
commit efdb65913b
4 changed files with 70 additions and 4 deletions

View File

@@ -160,3 +160,17 @@ issue_1801: {
console.log(!0);
}
}
issue_1986: {
options = {
global_defs: {
"@alert": "console.log",
},
}
input: {
alert(42);
}
expect: {
console.log(42);
}
}