import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import React from 'react';
import ReactTestRenderer from 'react-test-renderer';
import Flag from 'app/shared/components/flag/flag';

describe('Flag component tests', () => {
  Enzyme.configure({ adapter: new Adapter() });

  it('renders correctly without parameters', () => {
    const tree = ReactTestRenderer
      .create(<Flag countryCode={'pl'}/>)
      .toJSON();
    expect(tree).toMatchSnapshot();
  });

});
