camo: support URL encoding option
This commit is contained in:
parent
54045766f2
commit
486ce04a3e
6 changed files with 56 additions and 4 deletions
|
|
@ -15,6 +15,17 @@ describe('CamoConfig', () => {
|
|||
it('defaults to enabled=false', () => {
|
||||
assert.strictEqual(new CamoConfig().isEnabled(), false);
|
||||
});
|
||||
|
||||
it('validates that encoding must be either url or hex', () => {
|
||||
|
||||
assert.throws(() => {
|
||||
new CamoConfig({
|
||||
camo: {
|
||||
encoding: 'asdjfnasdf'
|
||||
}
|
||||
});
|
||||
}, /must be either 'url' or 'hex'/);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getWhitelistedDomains', () => {
|
||||
|
|
@ -22,4 +33,10 @@ describe('CamoConfig', () => {
|
|||
assert.deepStrictEqual(new CamoConfig().getWhitelistedDomains(), []);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getEncoding', () => {
|
||||
it('defaults to url', () => {
|
||||
assert.deepStrictEqual(new CamoConfig().getEncoding(), 'url');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue