renamePropertiesAutoExclude option changed by renamePropertiesMode option

This commit is contained in:
sanex
2021-03-07 12:16:38 +03:00
parent 7fe0561cd4
commit 0acb91ca60
18 changed files with 62 additions and 56 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
'use strict';
import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNodes';
import { RenamePropertiesMode } from '../../src/enums/node-transformers/rename-properties-transformers/RenamePropertiesMode';
(function () {
const JavaScriptObfuscator: any = require('../../index');
@@ -22,7 +23,7 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
...NO_ADDITIONAL_NODES_PRESET,
compact: false,
renameProperties: true,
renamePropertiesAutoExclude: true
renamePropertiesMode: RenamePropertiesMode.Safe
}
).getObfuscatedCode();
@@ -257,26 +257,6 @@ describe('OptionsNormalizer', () => {
});
});
describe('renamePropertiesAutoExclude', () => {
before(() => {
optionsPreset = getNormalizedOptions({
...getDefaultOptions(),
renameProperties: false,
renamePropertiesAutoExclude: true
});
expectedOptionsPreset = {
...getDefaultOptions(),
renameProperties: false,
renamePropertiesAutoExclude: false
};
});
it('should normalize options preset', () => {
assert.deepEqual(optionsPreset, expectedOptionsPreset);
});
});
describe('seedRule', () => {
describe('Variant #1: seed value is string', () => {
before(() => {