title: Enzyme expects an adapter to be configured
body: <p>I created a new React application by create-react-app and I wanted to write a unit test to a component named "MessageBox" that I created in the application. This is the unit test that I wrote: </p>
  
  <pre><code>import MessageBox from "../MessageBox";
  import { shallow } from 'enzyme';
  import React from 'react';
  
  test('message box', () =&gt; {
     const app = {setState: jest.fn()};
     const wrapper = shallow(&lt;MessageBox app={app}/&gt;);
     wrapper.find('button').at(0).simulate('click');
     expect(app.setState).toHaveBeenLastCalledWith({modalIsOpen: false});
  });
  </code></pre>
  
  <p>I also added a file under 'src' folder named 'setupTests.js' with the content: </p>
  
  <pre><code>import * as enzyme from 'enzyme';
  import * as Adapter from 'enzyme-adapter-react-16';
  
  enzyme.configure({ adapter: new Adapter() });
  </code></pre>
  
  <p>I ran it by:</p>
  
  <blockquote>
    <p>npm test</p>
  </blockquote>
  
  <p>and I got the error: </p>
  
  <blockquote>
    <p>Enzyme Internal Error: Enzyme expects an adapter to be configured, but
    found none. To configure an adapter, you should call <code>Enzyme.configure({ &gt; adapter: new Adapter() })</code></p>
  </blockquote>
  
  <p>Do you know what can solve this problem?</p>