Skip to content

Commit

Permalink
test: ensure url in both lists pass
Browse files Browse the repository at this point in the history
Resolves #10
  • Loading branch information
FutureDuck authored and lfilho committed Jun 14, 2020
1 parent 8ff5efb commit f4916da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions __tests__/src/lib/request_matcher.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import RequestMatcher from '../../../src/lib/request_matcher.js';
import {
A_URL,
BAD_URL,
GOOD_URL,
URL_IN_NO_LISTS,
Expand Down Expand Up @@ -27,4 +28,11 @@ describe('Request Matcher', () => {
const result = RequestMatcher.isDenied(GOOD_URL);
expect(result).toBe(false);
});

it('should allow urls in both lists', () => {
RequestMatcher.allowList.add(A_URL);
RequestMatcher.denyList.add(A_URL);
const result = RequestMatcher.isDenied(A_URL);
expect(result).toBe(false);
});
});

0 comments on commit f4916da

Please sign in to comment.