Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
remusao committed Sep 22, 2021
1 parent 8b9aa56 commit 68e5365
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions packages/adblocker-extended-selectors/test/parse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ describe('parse', () => {
'length': 9,
'name': 'remove',
'pos': [4, 13],
'subtree': undefined,
'type': 'pseudo-class',
},
],
Expand All @@ -252,6 +253,7 @@ describe('parse', () => {
},
{
'type': 'pseudo-class',
'subtree': undefined,
'argument': '2',
'content': ':has-text(2)',
'length': 12,
Expand All @@ -260,6 +262,7 @@ describe('parse', () => {
},
{
'type': 'pseudo-class',
'subtree': undefined,
'argument': 'left-3000px !important;position:absolute !important',
'content': ':style(left-3000px !important;position:absolute !important)',
'length': 59,
Expand Down Expand Up @@ -287,6 +290,7 @@ describe('parse', () => {
'length': 10,
'name': 'xpath',
'pos': [4, 14],
'subtree': undefined,
'type': 'pseudo-class',
},
],
Expand Down Expand Up @@ -356,6 +360,7 @@ describe('parse', () => {
'length': 6,
'name': 'scope',
'pos': [0, 6],
'subtree': undefined,
'type': 'pseudo-class',
},
'right': {
Expand Down Expand Up @@ -690,6 +695,7 @@ describe('parse', () => {
'content': ':has-text(/foo bar/i)',
'length': 21,
'name': 'has-text',
'subtree': undefined,
'pos': [17, 38],
},
],
Expand Down
6 changes: 3 additions & 3 deletions packages/adblocker/src/engine/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ export default class FilterEngine extends EventEmitter<
hostname: string;
domain: string | null | undefined;

classes?: string[];
hrefs?: string[];
ids?: string[];
classes?: string[] | undefined;
hrefs?: string[] | undefined;
ids?: string[] | undefined;

getBaseRules?: boolean;
getInjectionRules?: boolean;
Expand Down

0 comments on commit 68e5365

Please sign in to comment.