Some minor fixes for domainDest option description. Added normalisation. Version update.

This commit is contained in:
sanex
2021-06-10 20:43:49 +03:00
parent 5019500c07
commit da40474079
13 changed files with 304 additions and 194 deletions
@@ -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({