@@ -13,7 +13,7 @@ test('Sends correct error event', async ({ baseURL }) => {
1313 expect ( errorEvent . exception ?. values ) . toHaveLength ( 1 ) ;
1414 expect ( errorEvent . exception ?. values ?. [ 0 ] ?. value ) . toBe ( 'This is an exception with id 123' ) ;
1515
16- expect ( errorEvent . request ) . toEqual ( {
16+ expect ( errorEvent . request ) . toMatchObject ( {
1717 method : 'GET' ,
1818 cookies : { } ,
1919 headers : expect . any ( Object ) ,
@@ -43,11 +43,11 @@ test('Should record caught exceptions with local variable', async ({ baseURL })
4343
4444test ( 'To not crash app from withMonitor' , async ( { baseURL } ) => {
4545 const doRequest = async ( id : number ) => {
46- const response = await fetch ( `${ baseURL } /crash-in-with-monitor/${ id } ` )
46+ const response = await fetch ( `${ baseURL } /crash-in-with-monitor/${ id } ` ) ;
4747 return response . json ( ) ;
48- }
49- const [ response1 , response2 ] = await Promise . all ( [ doRequest ( 1 ) , doRequest ( 2 ) ] )
50- expect ( response1 . message ) . toBe ( 'This is an exception withMonitor: 1' )
51- expect ( response2 . message ) . toBe ( 'This is an exception withMonitor: 2' )
52- expect ( response1 . pid ) . toBe ( response2 . pid ) //Just to double-check, TBS
48+ } ;
49+ const [ response1 , response2 ] = await Promise . all ( [ doRequest ( 1 ) , doRequest ( 2 ) ] ) ;
50+ expect ( response1 . message ) . toBe ( 'This is an exception withMonitor: 1' ) ;
51+ expect ( response2 . message ) . toBe ( 'This is an exception withMonitor: 2' ) ;
52+ expect ( response1 . pid ) . toBe ( response2 . pid ) ; //Just to double-check, TBS
5353} ) ;
0 commit comments