Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ describe('ErrorBoundary', () => {
// Error boundary should show error UI
expect(screen.getByText('Something went wrong')).toBeInTheDocument();

// Click try again
fireEvent.click(screen.getByText('Try Again'));

// Re-render with a component that doesn't throw
// Re-render with a component that doesn't throw (parent provides new children)
rerender(
<ErrorBoundary>
<ThrowError shouldThrow={false} />
</ErrorBoundary>
);

// Click try again to reset error state
fireEvent.click(screen.getByText('Try Again'));

expect(screen.getByText('No error')).toBeInTheDocument();
});

Expand Down