title: Testing react router v4 with jest enzyme
body: <p>I'm trying to do a simple test with react router v4 and jest enzyme. </p>
  
  <pre><code>describe('&lt;App /&gt;', () =&gt; {
  
    it('renders a static text', () =&gt; {
  
      const wrapper = shallow(
      &lt;MemoryRouter initialEntries={['/']} initialIndex={0}&gt;
        &lt;App/&gt;
      &lt;/MemoryRouter&gt;
  
      console.log(wrapper.html());
    );
  
    });
  });
  </code></pre>
  
  <p>When I try to console.log(wrapper.html()), I get:</p>
  
  <pre><code>Invariant Violation: [React Intl] Could not find required `intl` object. &lt;IntlProvider&gt; needs to exist in the component ancestry.
  </code></pre>
  
  <p>I am using the react-boiler-plate project. All I want to do is test that when I give it a path of '/' then the home page renders some text. </p>
  
  <p>Any help appreciated! Thanks!</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p><strong>This is the test:</strong></p>
  
  <pre><code>it('test', () =&gt; {
      const wrapper = shallow(
        &lt;MemoryRouter initialEntries={['/']} initialIndex={0}&gt;
          &lt;Route path="/" render={() =&gt; &lt;App/&gt;}/&gt;
        &lt;/MemoryRouter&gt;,
      );
  
      console.log(wrapper.find(App).html());
    });
  </code></pre>
  
  <p>This is the App class:</p>
  
  <pre><code>export default function App() {
    return (
      &lt;AppWrapper&gt;
        &lt;Helmet
          titleTemplate="%s - React.js Boilerplate"
          defaultTitle="React.js Boilerplate"
        &gt;
          &lt;meta name="description" content="A React.js Boilerplate application"/&gt;
        &lt;/Helmet&gt;
        &lt;Header/&gt;
        &lt;Switch&gt;
          &lt;Route exact path="/" component={HomePage}/&gt;
          &lt;Route path="/features" component={FeaturePage}/&gt;
          &lt;Route
            path="/catalog"
            render={() =&gt; &lt;div&gt;hi&lt;/div&gt;}
          /&gt;
          &lt;Route path="" component={NotFoundPage}/&gt;
        &lt;/Switch&gt;
        &lt;Footer/&gt;
      &lt;/AppWrapper&gt;
    );
  }
  </code></pre>
  
  <p>This is the error message when running the test:</p>
  
  <pre><code>**Error: Method “html” is only meant to be run on a single node. 0 found instead.**
  </code></pre>
  
  <p>I am expecting that this page would match and I would be able to console.log the output of it:</p>
  
  <pre><code>&lt;Route exact path="/" component={HomePage}/&gt;
  </code></pre>