import React from 'react';
import renderer from 'react-test-renderer'; // eslint-disable-line import/no-extraneous-dependencies

import Autocomplete from './index';

test('Autocomplete renders correctly', () => {
  const tree = renderer.create(
    <div>
      <Autocomplete
        onSelection={() => {}}
        noMatchLabel="No value matched"
        indexes={[
          'tototata',
          'totota',
          'toto',
          'tatatoto',
          'tatato',
          'tata',
          'foo bar baz',
          'foo bar',
          'foo'
        ]}
      />
    </div>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});
