Skip to content

Commit 08ba385

Browse files
committed
AG-46999 Add a test to make sure 'prevent-canvas' doesn't turn into an empty string.
1 parent 46e0245 commit 08ba385

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/converter.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ describe('converter', () => {
223223
expect(converted[0]).toEqual(input);
224224
});
225225

226+
// https://github.com/AdguardTeam/FiltersCompiler/issues/260
227+
it('prevents prevent-canvas scriptlet from being converted to empty string', () => {
228+
const input = "aceee.org#%#//scriptlet('prevent-canvas', '2d')";
229+
const converted = convertRulesToAdgSyntax([input]);
230+
expect(converted[0]).toEqual(input);
231+
});
232+
226233
describe('convertRulesToAdgSyntax - non-basic modifiers', () => {
227234
it.each([
228235
{

0 commit comments

Comments
 (0)