@@ -26,16 +26,16 @@ jest.mock('@sentry/browser', () => {
26
26
} ;
27
27
} ) ;
28
28
29
- function Boo ( { title } : { title : string } ) : JSX . Element {
29
+ function Boo ( { title } : { title : string } ) : React . JSX . Element {
30
30
throw new Error ( title ) ;
31
31
}
32
32
33
- function Bam ( ) : JSX . Element {
33
+ function Bam ( ) : React . JSX . Element {
34
34
const [ title ] = useState ( 'boom' ) ;
35
35
return < Boo title = { title } /> ;
36
36
}
37
37
38
- function EffectSpyFallback ( { error } : { error : unknown } ) : JSX . Element {
38
+ function EffectSpyFallback ( { error } : { error : unknown } ) : React . JSX . Element {
39
39
const [ counter , setCounter ] = useState ( 0 ) ;
40
40
41
41
React . useEffect ( ( ) => {
@@ -50,7 +50,7 @@ function EffectSpyFallback({ error }: { error: unknown }): JSX.Element {
50
50
}
51
51
52
52
interface TestAppProps extends ErrorBoundaryProps {
53
- errorComp ?: JSX . Element ;
53
+ errorComp ?: React . JSX . Element ;
54
54
}
55
55
56
56
const TestApp : React . FC < TestAppProps > = ( { children, errorComp, ...props } ) => {
@@ -282,7 +282,7 @@ describe('ErrorBoundary', () => {
282
282
it ( 'does not set cause if non Error objected is thrown' , ( ) => {
283
283
const TestAppThrowingString : React . FC < ErrorBoundaryProps > = ( { children, ...props } ) => {
284
284
const [ isError , setError ] = React . useState ( false ) ;
285
- function StringBam ( ) : JSX . Element {
285
+ function StringBam ( ) : React . JSX . Element {
286
286
throw 'bam' ;
287
287
}
288
288
return (
@@ -333,7 +333,7 @@ describe('ErrorBoundary', () => {
333
333
it ( 'handles when `error.cause` is nested' , ( ) => {
334
334
const mockOnError = jest . fn ( ) ;
335
335
336
- function CustomBam ( ) : JSX . Element {
336
+ function CustomBam ( ) : React . JSX . Element {
337
337
const firstError = new Error ( 'bam' ) ;
338
338
const secondError = new Error ( 'bam2' ) ;
339
339
const thirdError = new Error ( 'bam3' ) ;
@@ -378,7 +378,7 @@ describe('ErrorBoundary', () => {
378
378
it ( 'handles when `error.cause` is recursive' , ( ) => {
379
379
const mockOnError = jest . fn ( ) ;
380
380
381
- function CustomBam ( ) : JSX . Element {
381
+ function CustomBam ( ) : React . JSX . Element {
382
382
const firstError = new Error ( 'bam' ) ;
383
383
const secondError = new Error ( 'bam2' ) ;
384
384
// @ts -expect-error Need to set cause on error
0 commit comments