import { render, screen } from '@testing-library/react';
import SearchInput from '../components/SearchInput';
describe('SearchInput', () => {
describe('Snapshots', () => {
const onDelete = () => '';
it('Input field with normal state', () => {
const { asFragment } = render(
);
expect(asFragment()).toMatchSnapshot();
});
it('Input field with controlled value', () => {
render(
);
const input = screen.getByRole('textbox');
expect(input).toHaveValue('controlled value');
});
});
});