Improve text2dnr test coverage
Background / User story
We need to improve the test coverage.
Notably when working on abp2dnr!3 (merged) I found out that there are a couple of things that are different between the two, and we don't them. This include !645 (merged) where the default behaviour of regexp filter conversion is different.
What to change
-
Development:
- Import the test from abp2dnr
- Fix the two situation where there is a difference: !645 (merged) and https://gitlab.com/eyeo/adblockplus/abc/adblockpluscore/-/blob/master/lib/dnr/index.js#L136 where text2dnr keep the
*
.The fix involve figuring out what the proper outcome is.the documentation is clear.||*
as a prefix is not allowed and*
should be used. Clarified the comment.
-
Documentation:
- Document the behaviour change
Hints for testing
- Test should still pass reliably
Edited by Hubert Figuière