Skip to content

Commit

Permalink
add few scrpitlets conversion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed Dec 16, 2022
1 parent b4690d0 commit 5a4676b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/converter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ describe('converter', () => {
expected = 'example.org##+js(abort-on-property-write, adblock.check)';
expect(actual).toBe(expected);

actual = scriptlets.convertAdgToUbo("example.org#%#//scriptlet('set-constant', 'dataLayer', 'emptyArr')");

This comment has been minimized.

Copy link
@Josephus1123

Josephus1123 Feb 2, 2023

src/test/converter.test.js

expected = 'example.org##+js(set-constant, dataLayer, [])';
expect(actual).toBe(expected);

actual = scriptlets.convertAdgToUbo("example.org#%#//scriptlet('set-constant', 'dataLayer', 'emptyObj')");
expected = 'example.org##+js(set-constant, dataLayer, {})';
expect(actual).toBe(expected);

actual = scriptlets.convertAbpToAdg('test.com#$#abort-on-property-read adsShown');
expected = "test.com#%#//scriptlet('abp-abort-on-property-read', 'adsShown')";
expect(actual[0]).toBe(expected);
Expand Down

0 comments on commit 5a4676b

Please sign in to comment.