fixed tests

This commit is contained in:
sanex3339
2016-06-29 16:30:29 +03:00
parent 085732646b
commit 1456e631f2
2 changed files with 9 additions and 10 deletions
-4
View File
@@ -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', () => {
+9 -6
View File
@@ -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(