import React from 'react';
import ReactTestRenderer from 'react-test-renderer';
import { Hamburger } from 'app/modules/navigation/components/hamburger/hamburger';
import { ConsoleMock } from 'app/testUtils/consoleMock';
import Enzyme from 'enzyme/build/index';
import Adapter from 'enzyme-adapter-react-16/build/index';

describe('Hamburger component tests', () => {
  Enzyme.configure({ adapter: new Adapter() });
  it('renders correctly', () => {
    const consoleMock = new ConsoleMock();
    const tree = ReactTestRenderer
      .create(<Hamburger open/>)
      .toJSON();
    expect(tree).toMatchSnapshot();

    consoleMock.destroy();
  });
});
