@@ -43,6 +43,7 @@ function Recursive({ boundaries }: { boundaries: BoundaryTestSpec[] }) {
4343 </ div >
4444 ) ,
4545 } ;
46+ // eslint-disable-next-line no-restricted-syntax -- Test: runtime error type check
4647 return 'onError' in props ? < ErrorBoundary { ...props } /> : < BuiltInErrorBoundary { ...props } /> ;
4748}
4849
@@ -436,6 +437,7 @@ describe('error propagation and suppressNested', () => {
436437 ] ) ( 'suppressNested and suppressible: $description' , ( { boundaries, expected } ) => {
437438 render ( < Recursive boundaries = { boundaries } /> ) ;
438439 expect ( findHeader ( ) . getElement ( ) ) . toHaveTextContent ( expected ) ;
440+ // eslint-disable-next-line no-restricted-syntax -- Test: runtime error type check
439441 for ( const { onError, errorBoundaryId } of boundaries . filter ( b => 'onError' in b ) ) {
440442 if ( errorBoundaryId === expected ) {
441443 expect ( onError ) . toHaveBeenCalledWith ( {
@@ -546,6 +548,7 @@ describe('built-in error boundaries', () => {
546548 ] ) ( 'suppressing built-in boundaries, $description' , ( { boundaries, expected } ) => {
547549 render ( < Recursive boundaries = { boundaries } /> ) ;
548550 expect ( findBoundary ( ) ! . getElement ( ) . parentElement ! . textContent ) . toBe ( expected ) ;
551+ // eslint-disable-next-line no-restricted-syntax -- Test: runtime error type check
549552 for ( const { onError, errorBoundaryId } of boundaries . filter ( b => 'onError' in b ) ) {
550553 if ( errorBoundaryId && expected . includes ( errorBoundaryId ) ) {
551554 expect ( onError ) . toHaveBeenCalledWith ( {
0 commit comments