Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jellizaveta committed Dec 13, 2024
1 parent d304c09 commit f946f3a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/transformations/validate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,17 @@ describe('Validate', () => {
'@@||example.org^|$important',
]);
});

it('adblock-style rules', () => {
const rules = `||asia^$denyallow=amzn.asia
||bar^$denyallow=fap.bar
||beauty^$denyallow=homelab.beauty|nic.beauty|vipbj.beauty`;
const filtered = validate(rules);

expect(filtered).toEqual([
'||asia^$denyallow=amzn.asia',
'||bar^$denyallow=fap.bar',
'||beauty^$denyallow=homelab.beauty|nic.beauty|vipbj.beauty',
]);
});
});

0 comments on commit f946f3a

Please sign in to comment.