LibreChat/client/src/components/Input/Generations/__tests__/Continue.spec.tsx
MACHINSOFT 216f6da79e
🌐: Add Russian Translations (#1169)
* Add translation for the button and some elements.

* Make changes for tests.
2023-11-12 20:49:12 -05:00

22 lines
629 B
TypeScript

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