import * as React from 'react';
import { render } from '@testing-library/react';

import Component, { LinkProvider } from '@digigov/ui/navigation/Link';

const CustomLink: React.FC<any> = (props) => {
  return <div>{props.children}</div>;
};

it('renders the Link', () => {
  expect(render(<Component>hello</Component>).baseElement).toMatchSnapshot();
});

it('Provider', () => {
  expect(
    render(
      <LinkProvider component={CustomLink}>
        <Component>hello</Component>
      </LinkProvider>
    ).baseElement
  ).toMatchSnapshot();
});
