mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Some minor fixes for domainDest option description. Added normalisation. Version update.
This commit is contained in:
@@ -159,6 +159,52 @@ describe('OptionsNormalizer', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('domainDestRule', () => {
|
||||
describe('Variant #1: `domainLock` option is set', () => {
|
||||
before(() => {
|
||||
optionsPreset = getNormalizedOptions({
|
||||
...getDefaultOptions(),
|
||||
domainLock: [
|
||||
'localhost'
|
||||
],
|
||||
domainDest: 'https://example.com'
|
||||
});
|
||||
|
||||
expectedOptionsPreset = {
|
||||
...getDefaultOptions(),
|
||||
domainLock: [
|
||||
'localhost'
|
||||
],
|
||||
domainDest: 'https://example.com'
|
||||
};
|
||||
});
|
||||
|
||||
it('should not normalize options preset', () => {
|
||||
assert.deepEqual(optionsPreset, expectedOptionsPreset);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Variant #2 `domainLock` option is not set', () => {
|
||||
before(() => {
|
||||
optionsPreset = getNormalizedOptions({
|
||||
...getDefaultOptions(),
|
||||
domainLock: [],
|
||||
domainDest: 'https://example.com'
|
||||
});
|
||||
|
||||
expectedOptionsPreset = {
|
||||
...getDefaultOptions(),
|
||||
domainLock: [],
|
||||
domainDest: 'about:blank'
|
||||
};
|
||||
});
|
||||
|
||||
it('should normalize options preset', () => {
|
||||
assert.deepEqual(optionsPreset, expectedOptionsPreset);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('domainLockRule', () => {
|
||||
before(() => {
|
||||
optionsPreset = getNormalizedOptions({
|
||||
|
||||
Reference in New Issue
Block a user