mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Added tests for prohibited single if statement
This commit is contained in:
+9
-8
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user