| 12345678910111213141516171819202122232425262728 | import { assert } from 'chai';import { IObfuscationResult } from '../../../../src/interfaces/IObfuscationResult';import { NO_CUSTOM_NODES_PRESET } from '../../../../src/options/presets/NoCustomNodes';import { readFileAsString } from '../../../helpers/readFileAsString';import { JavaScriptObfuscator } from '../../../../src/JavaScriptObfuscator';describe('StringArrayCallsWrapper', () => {    it('should correctly append `StringArrayCallsWrapper` custom node into the obfuscated code', () => {        let obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(            readFileAsString(__dirname + '/fixtures/simple-input.js'),            {                ...NO_CUSTOM_NODES_PRESET,                stringArray: true,                stringArrayThreshold: 1,                wrapStringArrayCalls: true            }        );        assert.match(            obfuscationResult.getObfuscatedCode(),            /_0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6} *- *0x0\;/        );    });});
 |