mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
overall performance test for info
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user