TypeError: Cannot read property 'contextTypes' of undefined
<p>I'm trying to test a React-app with Jest. I use Enzyme's shallow to render my <code>App.js</code> component in <code>App-test-js</code> but I'm getting this error: <code>TypeError: Cannot read property 'contextTypes' of undefined</code></p>

<p>This is my <code>App.js</code>:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>/* global google */
import React, { Component } from 'react';
import Geosuggest from 'react-geosuggest';
import { getAirQuality } from './Client'
import DataTable from './DataTable'
import Errors from 'react-errors'


class App extends Component {

  .
  .
  .

  render() {
    return (
      &lt;div className="App"&gt;
        &lt;form onSubmit={this.searchAirQuality.bind(this)}&gt;
          &lt;Geosuggest
            placeholder="Type a location and press SEARCH button!"
            onSuggestSelect={this.onSuggestSelect.bind(this)}
            initialValue={this.state.place}
            location={new google.maps.LatLng(53.558572, 9.9278215)}
            radius="20"/&gt;
          &lt;button className="my-button" type="submit" disabled={!this.state.place}&gt;Button&lt;/button&gt;
        &lt;/form&gt;
        &lt;DataTable items={this.state.items} /&gt;
        &lt;Errors
          errors={this.state.errors}
          onErrorClose={this.handleErrorClose}
        /&gt;
      &lt;/div&gt;
    )
  }
}

export default App;</code></pre>
</div>
</div>
</p>

<p>and this is my <code>App-test.js</code>:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>import React from 'react'
import { shallow } from  'enzyme'
import App from '../components/App.js'

describe( '&lt;App /&gt;', () =&gt; {
  it('Button disable when input is empty', () =&gt; {
    const App = shallow(&lt;App /&gt;);

    expect(App.find('.my-button').hasClass('disabled')).to.equal(true);

  });

});</code></pre>
</div>
</div>
</p>

<p>And this the error when I run <code>npm test</code>:</p>

<p><a href="https://i.stack.imgur.com/WkNwL.png" rel="noreferrer">Terminal screenshot</a></p>

<p>This is my first time with testing in jest, please could someone help me with any idea about this error?</p>