import { Field } from '../field/Field';
import { mockResizeObserver, render, screen } from '../test-utils';
import { SearchInput } from './SearchInput';

mockResizeObserver();

describe('SearchInput', () => {
  it('supports `Field` for labeling', () => {
    render(
      <Field label="Search…">
        <SearchInput />
      </Field>,
    );
    expect(screen.getByLabelText(/Search…/)).toHaveRole('searchbox');
  });
});
