Skip to content

Commit

Permalink
Redtest: matchesSavedMap matchDomainOnly without host prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
LoveIsGrief committed Oct 16, 2019
1 parent c9fdc8e commit ea2bfc2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/__tests__/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,29 @@ describe('utils', () => {

});

describe('matchesSavedMap', () => {
describe('matchDomainOnly', () => {
describe('without host prefix', () => {
const url = 'https://duckduckgo.com';
const host = 'duckduckgo.com';
const matchDomainOnly = true;
it('should match url without path', () => {
expect(
utils.matchesSavedMap(url, matchDomainOnly, {host})
).toBeTruthy();
});
});
});
describe('without host prefix', () => {
it('should match url without path', () => {
const url = 'https://duckduckgo.com';
const host = 'duckduckgo.com';
const matchDomainOnly = false;
expect(
utils.matchesSavedMap(url, matchDomainOnly, {host})
).toBeTruthy();
});
});
});

});

0 comments on commit ea2bfc2

Please sign in to comment.