mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
fixed tests
This commit is contained in:
@@ -4,10 +4,6 @@ import { NO_CUSTOM_NODES_PRESET } from "../src/preset-options/NoCustomNodesPrese
|
||||
|
||||
const assert: Chai.AssertStatic = require('chai').assert;
|
||||
|
||||
beforeEach(() => {
|
||||
console.log(Object.assign);
|
||||
});
|
||||
|
||||
describe('JavaScriptObfuscator', () => {
|
||||
describe('obfuscate (sourceCode: string, customOptions?: IOptionsPreset): string', () => {
|
||||
it('should obfuscate simple code with variable inside global scope', () => {
|
||||
|
||||
@@ -8,18 +8,21 @@ const assert: Chai.AssertStatic = require('chai').assert;
|
||||
|
||||
describe('OptionsNormalizer', () => {
|
||||
describe('normalizeOptionsPreset (options: IOptionsPreset): IOptionsPreset', () => {
|
||||
let optionsPreset1: IOptionsPreset = Object.assign({}, DEFAULT_PRESET, {
|
||||
let optionsPreset1: IOptionsPreset,
|
||||
optionsPreset2: IOptionsPreset;
|
||||
|
||||
beforeEach(() => {
|
||||
optionsPreset1 = Object.assign({}, DEFAULT_PRESET, {
|
||||
compact: false,
|
||||
rotateUnicodeArray: true,
|
||||
unicodeArray: false,
|
||||
unicodeArrayThreshold: 0.5,
|
||||
wrapUnicodeArrayCalls: true
|
||||
|
||||
}),
|
||||
optionsPreset2: IOptionsPreset = Object.assign({}, DEFAULT_PRESET, {
|
||||
unicodeArrayThreshold: 2
|
||||
|
||||
});
|
||||
optionsPreset2 = Object.assign({}, DEFAULT_PRESET, {
|
||||
unicodeArrayThreshold: 2
|
||||
});
|
||||
});
|
||||
|
||||
it('should normalize options preset', () => {
|
||||
assert.deepEqual(
|
||||
|
||||
Reference in New Issue
Block a user