Fixed regression bug with combination of splitStrings and renameProperties option

https://github.com/javascript-obfuscator/javascript-obfuscator/issues/729
This commit is contained in:
sanex
2020-09-02 21:52:59 +03:00
parent 4512bcda65
commit a0dca0256b
7 changed files with 12 additions and 6 deletions
@@ -294,7 +294,12 @@ describe('RenamePropertiesTransformer', () => {
});
describe('Variant #8: integration with `splitStrings` option', () => {
const propertyRegExp: RegExp = /'a': *'long' *\+ *'Prop' *\+ *'erty' *\+ *'Valu' *\+ *'e'/;
const propertyRegExp: RegExp = new RegExp(
'const foo *= *{' +
'\'a\': *\'long\' *\\+ *\'Prop\' *\\+ *\'erty\' *\\+ *\'Valu\' *\\+ *\'e\'' +
'};' +
'foo\\[\'a\'];'
);
let obfuscatedCode: string;
@@ -1,3 +1,4 @@
const foo = {
longPropertyName: 'longPropertyValue'
};
foo.longPropertyName;