overall performance test for info

This commit is contained in:
sanex3339
2016-10-04 20:42:41 +03:00
parent 83516b0185
commit 56a4e80522
2 changed files with 17 additions and 7 deletions
@@ -7,15 +7,25 @@ const assert: Chai.AssertStatic = require('chai').assert;
describe('JavaScriptObfuscator performance', () => {
const iterationsCount: number = 500;
describe('performance', () => {
it('should returns object with obfuscated code and empty source map', function (): void {
this.timeout(15000);
describe('performance: multiple calls', () => {
it('shows performance time with multiple obfuscator calls', function (): void {
this.timeout(10000);
for (let i: number = 0; i < iterationsCount; i++) {
JavaScriptObfuscator.obfuscate(readFileAsString('./test/fixtures/sample.js'));
}
assert.equal(1, 1);
assert.isOk(true);
});
});
describe('performance: large source code', () => {
it('shows performance time with large code size', function (): void {
this.timeout(5000);
JavaScriptObfuscator.obfuscate(readFileAsString('./test/fixtures/sample.js').repeat(iterationsCount));
assert.isOk(true);
});
});
});