|
@@ -63,28 +63,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #3: string contains non-latin and non-digit characters and `unicodeEscapeSequence` is disabled', () => {
|
|
|
- let testFunc: () => void;
|
|
|
-
|
|
|
- before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/error-when-non-latin.js');
|
|
|
-
|
|
|
- testFunc = () => JavaScriptObfuscator.obfuscate(
|
|
|
- code,
|
|
|
- {
|
|
|
- ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
- stringArray: true,
|
|
|
- stringArrayThreshold: 1
|
|
|
- }
|
|
|
- );
|
|
|
- });
|
|
|
-
|
|
|
- it('should\'t throw an error', () => {
|
|
|
- assert.doesNotThrow(testFunc);
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- describe('Variant #4: same literal node values', () => {
|
|
|
+ describe('Variant #3: same literal node values', () => {
|
|
|
const stringArrayRegExp: RegExp = /^var _0x([a-f0-9]){4} *= *\['test'\];/;
|
|
|
const stringArrayCallRegExp: RegExp = /var test *= *_0x([a-f0-9]){4}\('0x0'\);/;
|
|
|
|
|
@@ -112,59 +91,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #5: `unicodeEscapeSequence` option is enabled', () => {
|
|
|
- const regExp: RegExp = /^var test *= *'\\x74\\x65\\x73\\x74';$/;
|
|
|
-
|
|
|
- let obfuscatedCode: string;
|
|
|
-
|
|
|
- before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/simple-input.js');
|
|
|
-
|
|
|
- obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
- code,
|
|
|
- {
|
|
|
- ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
- unicodeEscapeSequence: true
|
|
|
-
|
|
|
- }
|
|
|
- ).getObfuscatedCode();
|
|
|
- });
|
|
|
-
|
|
|
- it('should replace literal node value with unicode escape sequence', () => {
|
|
|
- assert.match(obfuscatedCode, regExp);
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- describe('Variant #6: `unicodeEscapeSequence` and `stringArray` options are enabled', () => {
|
|
|
- const stringArrayRegExp: RegExp = /^var _0x([a-f0-9]){4} *= *\['\\x74\\x65\\x73\\x74'\];/;
|
|
|
- const stringArrayCallRegExp: RegExp = /var test *= *_0x([a-f0-9]){4}\('\\x30\\x78\\x30'\);/;
|
|
|
-
|
|
|
- let obfuscatedCode: string;
|
|
|
-
|
|
|
- before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/simple-input.js');
|
|
|
-
|
|
|
- obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
- code,
|
|
|
- {
|
|
|
- ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
- stringArray: true,
|
|
|
- stringArrayThreshold: 1,
|
|
|
- unicodeEscapeSequence: true
|
|
|
- }
|
|
|
- ).getObfuscatedCode();
|
|
|
- });
|
|
|
-
|
|
|
- it('match #1: should replace literal node value with unicode escape sequence from string array', () => {
|
|
|
- assert.match(obfuscatedCode, stringArrayRegExp);
|
|
|
- });
|
|
|
-
|
|
|
- it('match #2: should replace literal node value with unicode escape sequence from string array', () => {
|
|
|
- assert.match(obfuscatedCode, stringArrayCallRegExp);
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- describe('Variant #7: short literal node value', () => {
|
|
|
+ describe('Variant #4: short literal node value', () => {
|
|
|
const regExp: RegExp = /var test *= *'te';/;
|
|
|
|
|
|
let obfuscatedCode: string;
|
|
@@ -187,7 +114,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #8: base64 encoding', () => {
|
|
|
+ describe('Variant #5: base64 encoding', () => {
|
|
|
const stringArrayRegExp: RegExp = new RegExp(`^var _0x([a-f0-9]){4} *= *\\['${swapLettersCase('dGVzdA==')}'];`);
|
|
|
const stringArrayCallRegExp: RegExp = /var test *= *_0x([a-f0-9]){4}\('0x0'\);/;
|
|
|
|
|
@@ -216,7 +143,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #9: rc4 encoding', () => {
|
|
|
+ describe('Variant #6: rc4 encoding', () => {
|
|
|
describe('Variant #1: single string literal', () => {
|
|
|
const regExp: RegExp = /var test *= *_0x([a-f0-9]){4}\('0x0', *'.{4}'\);/;
|
|
|
|
|
@@ -282,7 +209,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #10: none and base64 encoding', () => {
|
|
|
+ describe('Variant #7: none and base64 encoding', () => {
|
|
|
describe('Variant #1: string array values', () => {
|
|
|
const samplesCount: number = 300;
|
|
|
const expectedMatchesChance: number = 0.5;
|
|
@@ -338,7 +265,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #11: none and rc4 encoding', () => {
|
|
|
+ describe('Variant #8: none and rc4 encoding', () => {
|
|
|
describe('Variant #1: string array calls wrapper call', () => {
|
|
|
const samplesCount: number = 300;
|
|
|
const expectedMatchesChance: number = 0.5;
|
|
@@ -394,7 +321,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #12: base64 and rc4 encoding', () => {
|
|
|
+ describe('Variant #9: base64 and rc4 encoding', () => {
|
|
|
describe('Variant #1: single string literal', () => {
|
|
|
const samplesCount: number = 300;
|
|
|
const expectedMatchesChance: number = 0.5;
|
|
@@ -450,7 +377,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #13: `stringArrayThreshold` option value', () => {
|
|
|
+ describe('Variant #10: `stringArrayThreshold` option value', () => {
|
|
|
const samples: number = 1000;
|
|
|
const stringArrayThreshold: number = 0.5;
|
|
|
const delta: number = 0.1;
|
|
@@ -493,7 +420,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #14: string array calls wrapper name', () => {
|
|
|
+ describe('Variant #11: string array calls wrapper name', () => {
|
|
|
const regExp: RegExp = /console\[b\('0x0'\)]\('a'\);/;
|
|
|
|
|
|
let obfuscatedCode: string;
|
|
@@ -517,7 +444,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #15: `reservedStrings` option is enabled', () => {
|
|
|
+ describe('Variant #12: `reservedStrings` option is enabled', () => {
|
|
|
describe('Variant #1: base `reservedStrings` values', () => {
|
|
|
describe('Variant #1: single reserved string value', () => {
|
|
|
const stringLiteralRegExp1: RegExp = /const foo *= *'foo';/;
|
|
@@ -526,7 +453,7 @@ describe('StringArrayTransformer', function () {
|
|
|
let obfuscatedCode: string;
|
|
|
|
|
|
before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option-1.js');
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option.js');
|
|
|
|
|
|
obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
code,
|
|
@@ -555,7 +482,7 @@ describe('StringArrayTransformer', function () {
|
|
|
let obfuscatedCode: string;
|
|
|
|
|
|
before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option-1.js');
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option.js');
|
|
|
|
|
|
obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
code,
|
|
@@ -586,7 +513,7 @@ describe('StringArrayTransformer', function () {
|
|
|
let obfuscatedCode: string;
|
|
|
|
|
|
before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option-1.js');
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option.js');
|
|
|
|
|
|
obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
code,
|
|
@@ -615,7 +542,7 @@ describe('StringArrayTransformer', function () {
|
|
|
let obfuscatedCode: string;
|
|
|
|
|
|
before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option-1.js');
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option.js');
|
|
|
|
|
|
obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
code,
|
|
@@ -637,59 +564,230 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
+ });
|
|
|
|
|
|
- describe('Variant #3: `unicodeEscapeSequence` option is enabled', () => {
|
|
|
- const stringLiteralRegExp1: RegExp = /const foo *= *'foo';/;
|
|
|
- const stringLiteralRegExp2: RegExp = /const bar *= *'\\x62\\x61\\x72';/;
|
|
|
+ describe('Variant #13: `forceTransformStrings` option is enabled', () => {
|
|
|
+ describe('Variant #1: base `forceTransformStrings` values', () => {
|
|
|
+ describe('Variant #1: single force transform string value', () => {
|
|
|
+ const stringLiteralRegExp1: RegExp = /const foo *= *'foo';/;
|
|
|
+ const stringLiteralRegExp2: RegExp = /const bar *= *_0x([a-f0-9]){4}\('0x0'\);/;
|
|
|
|
|
|
- let obfuscatedCode: string;
|
|
|
+ let obfuscatedCode: string;
|
|
|
|
|
|
- before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option-1.js');
|
|
|
+ before(() => {
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/force-transform-strings-option.js');
|
|
|
|
|
|
- obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
- code,
|
|
|
- {
|
|
|
- ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
- reservedStrings: ['foo'],
|
|
|
- unicodeEscapeSequence: true
|
|
|
- }
|
|
|
- ).getObfuscatedCode();
|
|
|
+ obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
+ code,
|
|
|
+ {
|
|
|
+ ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
+ forceTransformStrings: ['bar'],
|
|
|
+ stringArray: true,
|
|
|
+ stringArrayThreshold: 0
|
|
|
+ }
|
|
|
+ ).getObfuscatedCode();
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #1: should not transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp1);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #2: should transform force transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp2);
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('Variant #2: two force transform string values', () => {
|
|
|
+ const stringLiteralRegExp1: RegExp = /const foo *= *_0x([a-f0-9]){4}\('0x0'\);/;
|
|
|
+ const stringLiteralRegExp2: RegExp = /const bar *= *_0x([a-f0-9]){4}\('0x1'\);/;
|
|
|
+
|
|
|
+ let obfuscatedCode: string;
|
|
|
+
|
|
|
+ before(() => {
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/force-transform-strings-option.js');
|
|
|
+
|
|
|
+ obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
+ code,
|
|
|
+ {
|
|
|
+ ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
+ forceTransformStrings: ['foo', 'bar'],
|
|
|
+ stringArray: true,
|
|
|
+ stringArrayThreshold: 0
|
|
|
+ }
|
|
|
+ ).getObfuscatedCode();
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #1: should transform force transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp1);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #2: should transform force transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp2);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('Variant #2: RegExp `forceTransformStrings` values', () => {
|
|
|
+ describe('Variant #1: single force transform string value', () => {
|
|
|
+ const stringLiteralRegExp1: RegExp = /const foo *= *'foo'/;
|
|
|
+ const stringLiteralRegExp2: RegExp = /const bar *= *_0x([a-f0-9]){4}\('0x0'\);/;
|
|
|
+
|
|
|
+ let obfuscatedCode: string;
|
|
|
+
|
|
|
+ before(() => {
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/force-transform-strings-option.js');
|
|
|
+
|
|
|
+ obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
+ code,
|
|
|
+ {
|
|
|
+ ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
+ forceTransformStrings: ['ar$'],
|
|
|
+ stringArray: true,
|
|
|
+ stringArrayThreshold: 0
|
|
|
+ }
|
|
|
+ ).getObfuscatedCode();
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #1: should not transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp1);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #2: should transform force transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp2);
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
- it('match #1: should ignore reserved strings', () => {
|
|
|
- assert.match(obfuscatedCode, stringLiteralRegExp1);
|
|
|
+ describe('Variant #2: two force transform string values', () => {
|
|
|
+ const stringLiteralRegExp1: RegExp = /const foo *= *_0x([a-f0-9]){4}\('0x0'\);/;
|
|
|
+ const stringLiteralRegExp2: RegExp = /const bar *= *_0x([a-f0-9]){4}\('0x1'\);/;
|
|
|
+
|
|
|
+ let obfuscatedCode: string;
|
|
|
+
|
|
|
+ before(() => {
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/force-transform-strings-option.js');
|
|
|
+
|
|
|
+ obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
+ code,
|
|
|
+ {
|
|
|
+ ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
+ forceTransformStrings: ['^fo', '.ar'],
|
|
|
+ stringArray: true,
|
|
|
+ stringArrayThreshold: 1
|
|
|
+ }
|
|
|
+ ).getObfuscatedCode();
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #1: should transform force transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp1);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #2: should transform force transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp2);
|
|
|
+ });
|
|
|
});
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('Variant #3: `stringArray` option is disabled', () => {
|
|
|
+ describe('Variant #1: base case', () => {
|
|
|
+ const stringLiteralRegExp1: RegExp = /const foo *= *'foo';/;
|
|
|
+ const stringLiteralRegExp2: RegExp = /const bar *= *'bar';/;
|
|
|
|
|
|
- it('match #2: should transform non-reserved strings', () => {
|
|
|
- assert.match(obfuscatedCode, stringLiteralRegExp2);
|
|
|
+ let obfuscatedCode: string;
|
|
|
+
|
|
|
+ before(() => {
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/force-transform-strings-option.js');
|
|
|
+
|
|
|
+ obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
+ code,
|
|
|
+ {
|
|
|
+ ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
+ forceTransformStrings: ['foo', 'bar'],
|
|
|
+ stringArray: false,
|
|
|
+ stringArrayThreshold: 0
|
|
|
+ }
|
|
|
+ ).getObfuscatedCode();
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #1: should not transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp1);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #2: should not transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp2);
|
|
|
+ });
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #4: correct escape of special characters', () => {
|
|
|
- const stringLiteralRegExp: RegExp = /var baz *= *'Cannot find module \\'' *\+ *foo *\+ *'\\x27';/;
|
|
|
+ describe('Variant #4: Priority over `reservedStrings` option', () => {
|
|
|
+ describe('Variant #1: base case', () => {
|
|
|
+ const stringLiteralRegExp1: RegExp = /const foo *= *'foo';/;
|
|
|
+ const stringLiteralRegExp2: RegExp = /const bar *= *_0x([a-f0-9]){4}\('0x0'\);/;
|
|
|
|
|
|
- let obfuscatedCode: string;
|
|
|
+ let obfuscatedCode: string;
|
|
|
|
|
|
- before(() => {
|
|
|
- const code: string = readFileAsString(__dirname + '/fixtures/reserved-strings-option-2.js');
|
|
|
+ before(() => {
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/force-transform-strings-option.js');
|
|
|
|
|
|
- obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
- code,
|
|
|
- {
|
|
|
- ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
- reservedStrings: ['a']
|
|
|
- }
|
|
|
- ).getObfuscatedCode();
|
|
|
+ obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
+ code,
|
|
|
+ {
|
|
|
+ ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
+ forceTransformStrings: ['bar'],
|
|
|
+ reservedStrings: ['foo', 'bar'],
|
|
|
+ stringArray: true,
|
|
|
+ stringArrayThreshold: 1
|
|
|
+ }
|
|
|
+ ).getObfuscatedCode();
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #1: should not transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp1);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #2: should transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp2);
|
|
|
+ });
|
|
|
});
|
|
|
+ });
|
|
|
+
|
|
|
+ describe('Variant #5: Priority on conditional comments', () => {
|
|
|
+ describe('Variant #1: base case', () => {
|
|
|
+ const stringLiteralRegExp1: RegExp = /const foo *= *'foo';/;
|
|
|
+ const stringLiteralRegExp2: RegExp = /const bar *= *'bar';/;
|
|
|
+ const stringLiteralRegExp3: RegExp = /const baz *= *_0x([a-f0-9]){4}\('0x0'\);/;
|
|
|
+
|
|
|
+ let obfuscatedCode: string;
|
|
|
+
|
|
|
+ before(() => {
|
|
|
+ const code: string = readFileAsString(__dirname + '/fixtures/force-transform-strings-option-conditional-comments.js');
|
|
|
|
|
|
- it('match #1: should ignore reserved strings', () => {
|
|
|
- assert.match(obfuscatedCode, stringLiteralRegExp);
|
|
|
+ obfuscatedCode = JavaScriptObfuscator.obfuscate(
|
|
|
+ code,
|
|
|
+ {
|
|
|
+ ...NO_ADDITIONAL_NODES_PRESET,
|
|
|
+ forceTransformStrings: ['bar'],
|
|
|
+ stringArray: true,
|
|
|
+ stringArrayThreshold: 1
|
|
|
+ }
|
|
|
+ ).getObfuscatedCode();
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #1: should not transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp1);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #2: should not transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp2);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('match #3: should transform string', () => {
|
|
|
+ assert.match(obfuscatedCode, stringLiteralRegExp3);
|
|
|
+ });
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #16: object expression key literal', () => {
|
|
|
+ describe('Variant #14: object expression key literal', () => {
|
|
|
describe('Variant #1: base key literal', () => {
|
|
|
const stringArrayRegExp: RegExp = /^var _0x([a-f0-9]){4} *= *\['bar'];/;
|
|
|
const objectExpressionRegExp: RegExp = /var test *= *{'foo' *: *_0x([a-f0-9]){4}\('0x0'\)};/;
|
|
@@ -747,7 +845,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #17: import declaration source literal', () => {
|
|
|
+ describe('Variant #15: import declaration source literal', () => {
|
|
|
const importDeclarationRegExp: RegExp = /import *{ *bar *} *from *'foo';/;
|
|
|
|
|
|
let obfuscatedCode: string;
|
|
@@ -770,7 +868,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #18: export all declaration source literal', () => {
|
|
|
+ describe('Variant #16: export all declaration source literal', () => {
|
|
|
const exportAllDeclarationRegExp: RegExp = /export *\* *from *'foo';/;
|
|
|
|
|
|
let obfuscatedCode: string;
|
|
@@ -793,7 +891,7 @@ describe('StringArrayTransformer', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('Variant #19: export named declaration source literal', () => {
|
|
|
+ describe('Variant #17: export named declaration source literal', () => {
|
|
|
const exportNamedDeclarationRegExp: RegExp = /export *{ *bar *} *from *'foo';/;
|
|
|
|
|
|
let obfuscatedCode: string;
|