@@ -247,7 +247,7 @@ describe('ErrorBoundary', () => {
247247 const error = mockCaptureException . mock . calls [ 0 ] [ 0 ] ;
248248 const cause = error . cause ;
249249 expect ( cause . stack ) . toEqual ( mockCaptureException . mock . calls [ 0 ] [ 1 ] . contexts . react . componentStack ) ;
250- expect ( cause . name ) . toContain ( 'React ErrorBoundary' ) ;
250+ expect ( cause . constructor . name ) . toContain ( 'React ErrorBoundary' ) ;
251251 expect ( cause . message ) . toEqual ( error . message ) ;
252252 } ) ;
253253
@@ -339,7 +339,7 @@ describe('ErrorBoundary', () => {
339339 const firstError = secondError . cause ;
340340 const cause = firstError . cause ;
341341 expect ( cause . stack ) . toEqual ( mockCaptureException . mock . calls [ 0 ] [ 1 ] . contexts . react . componentStack ) ;
342- expect ( cause . name ) . toContain ( 'React ErrorBoundary' ) ;
342+ expect ( cause . constructor . name ) . toContain ( 'React ErrorBoundary' ) ;
343343 expect ( cause . message ) . toEqual ( thirdError . message ) ;
344344 } ) ;
345345
@@ -379,7 +379,7 @@ describe('ErrorBoundary', () => {
379379 const cause = error . cause ;
380380 // We need to make sure that recursive error.cause does not cause infinite loop
381381 expect ( cause . stack ) . not . toEqual ( mockCaptureException . mock . calls [ 0 ] [ 1 ] . contexts . react . componentStack ) ;
382- expect ( cause . name ) . not . toContain ( 'React ErrorBoundary' ) ;
382+ expect ( cause . constructor . name ) . not . toContain ( 'React ErrorBoundary' ) ;
383383 } ) ;
384384
385385 it ( 'calls `beforeCapture()` when an error occurs' , ( ) => {
0 commit comments