import { render, fireEvent } from '@testing-library/react'; import Continue from '../Continue'; describe('Continue', () => { it('should render the Continue button', () => { const { getByText } = render( { (''); }} />, ); expect(getByText('Continue')).toBeInTheDocument(); }); it('should call onClick when the button is clicked', () => { const handleClick = jest.fn(); const { getByText } = render(); fireEvent.click(getByText('Continue')); expect(handleClick).toHaveBeenCalledTimes(1); }); });