@@ -247,7 +247,7 @@ describe('ErrorBoundary', () => {
247
247
const error = mockCaptureException . mock . calls [ 0 ] [ 0 ] ;
248
248
const cause = error . cause ;
249
249
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' ) ;
251
251
expect ( cause . message ) . toEqual ( error . message ) ;
252
252
} ) ;
253
253
@@ -339,7 +339,7 @@ describe('ErrorBoundary', () => {
339
339
const firstError = secondError . cause ;
340
340
const cause = firstError . cause ;
341
341
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' ) ;
343
343
expect ( cause . message ) . toEqual ( thirdError . message ) ;
344
344
} ) ;
345
345
@@ -379,7 +379,7 @@ describe('ErrorBoundary', () => {
379
379
const cause = error . cause ;
380
380
// We need to make sure that recursive error.cause does not cause infinite loop
381
381
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' ) ;
383
383
} ) ;
384
384
385
385
it ( 'calls `beforeCapture()` when an error occurs' , ( ) => {
0 commit comments