Added tests for prohibited single if statement

This commit is contained in:
sanex3339
2020-07-04 12:53:31 +03:00
parent 2e198d1190
commit 3a3d350d96
8 changed files with 89 additions and 32 deletions
+9 -8
View File
@@ -7,14 +7,15 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
`
function foo () {
if (true) {
if (foo === 1) {
}
} else {
function foo () {}
}
}
function foo() {
if (true) {
if (false) {
var bar = baz();
}
} else {
var bark = hawk();
}
}
`,
{
...NO_ADDITIONAL_NODES_PRESET,