Closed gorhill closed 1 year ago
@gorhill could you please also add some tests for it?
Not sure how is thebest way to test this. I implemented using a throw because the code in there is ready to deal with exception:
https://github.com/AdguardTeam/FiltersCompiler/blob/master/src/main/converter.js#L33-L44
In which case if I understand correctly, the filter will be dropped.
The test for scriptlets with path modifier is at:
https://github.com/AdguardTeam/FiltersCompiler/blob/master/src/test/converter.test.js#L573-L581
But not sure how to test for expected exception.
I think I understand better how this is supposed to work, I will modify the fix.
uBO's scriptlet syntax does not support AdGuard's
[path=...]
option.To prevent conversion to invalid filter, the conversion will error when attempting to convert an AdGuard scriptlet with a path option present.
Related issue: