mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
renamePropertiesAutoExclude option changed by renamePropertiesMode option
This commit is contained in:
+2
-1
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user