@@ -18,7 +18,8 @@ export const setupDebugLog = (context: BrowserContext) => {
1818} ;
1919
2020export const setupProxy = ( context : BrowserContext ) => {
21- const cdnPattern = / c d n .j s d e l i v r .n e t \/ n p m \/ @ r u b y \/ .+ - w a s m - w a s i @ .+ \/ d i s t \/ ( .+ ) / ;
21+ const cdnPattern =
22+ / c d n .j s d e l i v r .n e t \/ n p m \/ @ r u b y \/ .+ - w a s m - w a s i @ .+ \/ d i s t \/ ( .+ ) / ;
2223 context . route ( cdnPattern , ( route ) => {
2324 const request = route . request ( ) ;
2425 console . log ( ">> [MOCK]" , request . method ( ) , request . url ( ) ) ;
@@ -29,16 +30,17 @@ export const setupProxy = (context: BrowserContext) => {
2930 } ) ;
3031} ;
3132
32- export const { setupUncaughtExceptionRejection, expectUncaughtException } = ( ( ) => {
33- const rejectUncaughtException = ( err : Error ) => {
34- expect ( err ) . toEqual ( undefined ) ;
35- }
36- return {
37- setupUncaughtExceptionRejection : ( page : Page ) => {
38- page . on ( "pageerror" , rejectUncaughtException ) ;
39- } ,
40- expectUncaughtException : ( page : Page ) => {
41- page . off ( "pageerror" , rejectUncaughtException ) ;
42- } ,
43- }
44- } ) ( )
33+ export const { setupUncaughtExceptionRejection, expectUncaughtException } =
34+ ( ( ) => {
35+ const rejectUncaughtException = ( err : Error ) => {
36+ expect ( err ) . toEqual ( undefined ) ;
37+ } ;
38+ return {
39+ setupUncaughtExceptionRejection : ( page : Page ) => {
40+ page . on ( "pageerror" , rejectUncaughtException ) ;
41+ } ,
42+ expectUncaughtException : ( page : Page ) => {
43+ page . off ( "pageerror" , rejectUncaughtException ) ;
44+ } ,
45+ } ;
46+ } ) ( ) ;
0 commit comments