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

import Tooltip from './index';
import Button from '../Button';

test('Tooltip renders correctly', () => {
  const tree = renderer.create(
    <div>
      <Tooltip
        component="a"
        overlay="hey"
        href="http://wwayne.com/react-tooltip/"
      >
        Hover ◕‿‿◕ me
      </Tooltip>
      <hr />
      <Tooltip
        component={Button}
        overlay={
          <strong>Title</strong>
        }
      >
        Hover இдஇ me
      </Tooltip>
    </div>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});
