diff --git a/packages/react/src/errorboundary.tsx b/packages/react/src/errorboundary.tsx index b4a752c87930..8af56894fadd 100644 --- a/packages/react/src/errorboundary.tsx +++ b/packages/react/src/errorboundary.tsx @@ -156,7 +156,7 @@ class ErrorBoundary extends React.Component { expect(container.innerHTML).toBe('

children

'); }); + it('supports rendering children as a function', () => { + const { container } = render( + Error Component}>{() =>

children

}
, + ); + + expect(container.innerHTML).toBe('

children

'); + }); + describe('fallback', () => { it('renders a fallback component', async () => { const { container } = render(