mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
13 lines
545 B
TypeScript
13 lines
545 B
TypeScript
import { assert } from 'chai';
|
|
|
|
import { RandomGeneratorUtils } from '../../../src/utils/RandomGeneratorUtils';
|
|
|
|
describe('RandomGeneratorUtils', () => {
|
|
describe('getRandomVariableName (length: number = 6): string', () => {
|
|
it('should return a string of given length with random variable name', () => {
|
|
assert.match(RandomGeneratorUtils.getRandomVariableName(4, true, false), /^_0x(\w){4}$/);
|
|
assert.match(RandomGeneratorUtils.getRandomVariableName(6, true, true), /^_0x(\w){4,6}$/);
|
|
});
|
|
});
|
|
});
|