@@ -750,28 +750,42 @@ describe('ScriptletInjectionBodyParser', () => {
750
750
( ) => ScriptletInjectionBodyParser . parseAdgAndUboScriptletCall ( '//scriptlet(arg0)a' ) ,
751
751
) . toThrowError (
752
752
// eslint-disable-next-line max-len
753
- `Invalid AdGuard/uBlock scriptlet call, unexpected characters after the closing parentheses '${ CLOSE_PARENTHESIS } '` ,
753
+ `Invalid AdGuard/uBlock scriptlet call, no closing parentheses '${ CLOSE_PARENTHESIS } ' found ` ,
754
754
) ;
755
755
756
756
expect (
757
757
( ) => ScriptletInjectionBodyParser . parseAdgAndUboScriptletCall ( '//scriptlet(arg0) a' ) ,
758
758
) . toThrowError (
759
759
// eslint-disable-next-line max-len
760
- `Invalid AdGuard/uBlock scriptlet call, unexpected characters after the closing parentheses '${ CLOSE_PARENTHESIS } '` ,
760
+ `Invalid AdGuard/uBlock scriptlet call, no closing parentheses '${ CLOSE_PARENTHESIS } ' found` ,
761
+ ) ;
762
+
763
+ expect (
764
+ ( ) => ScriptletInjectionBodyParser . parseAdgAndUboScriptletCall ( String . raw `//scriptlet(arg0\)` ) ,
765
+ ) . toThrowError (
766
+ // eslint-disable-next-line max-len
767
+ `Invalid AdGuard/uBlock scriptlet call, no closing parentheses '${ CLOSE_PARENTHESIS } ' found` ,
761
768
) ;
762
769
763
770
expect (
764
771
( ) => ScriptletInjectionBodyParser . parseAdgAndUboScriptletCall ( 'js(arg0)a' ) ,
765
772
) . toThrowError (
766
773
// eslint-disable-next-line max-len
767
- `Invalid AdGuard/uBlock scriptlet call, unexpected characters after the closing parentheses '${ CLOSE_PARENTHESIS } '` ,
774
+ `Invalid AdGuard/uBlock scriptlet call, no closing parentheses '${ CLOSE_PARENTHESIS } ' found ` ,
768
775
) ;
769
776
770
777
expect (
771
778
( ) => ScriptletInjectionBodyParser . parseAdgAndUboScriptletCall ( 'js(arg0) a' ) ,
772
779
) . toThrowError (
773
780
// eslint-disable-next-line max-len
774
- `Invalid AdGuard/uBlock scriptlet call, unexpected characters after the closing parentheses '${ CLOSE_PARENTHESIS } '` ,
781
+ `Invalid AdGuard/uBlock scriptlet call, no closing parentheses '${ CLOSE_PARENTHESIS } ' found` ,
782
+ ) ;
783
+
784
+ expect (
785
+ ( ) => ScriptletInjectionBodyParser . parseAdgAndUboScriptletCall ( String . raw `js(arg0\)` ) ,
786
+ ) . toThrowError (
787
+ // eslint-disable-next-line max-len
788
+ `Invalid AdGuard/uBlock scriptlet call, no closing parentheses '${ CLOSE_PARENTHESIS } ' found` ,
775
789
) ;
776
790
} ) ;
777
791
0 commit comments