title: How to test a React component that has Router, Redux and two HOCs... with Jest and Enzyme?
body: <p>I am currently unable to find a solution to this problem. 
  I have a React Component that is connected to React Router 4, Redux store and is wrapped by two HOCs. Its pretty crazy, but this is how it was coded. 
  Here is the export to give you an idea: </p>
  
  <pre><code>export default withFetch(Component)(fetchData, mapStateToProps)
  </code></pre>
  
  <p>I am trying to run some basic tests on it: </p>
  
  <pre><code>  it('should render self and subcomponents', () =&gt; {
      const wrapper = shallow(&lt;Component {...props} /&gt;)
      expect(toJson(wrapper)).toMatchSnapshot()
    })
  </code></pre>
  
  <p>Which outputs a console.log/snapshot of:</p>
  
  <pre><code>&lt;Route render={[Function: render]} /&gt;
  </code></pre>
  
  <p>Things tried but no succeed:</p>
  
  <ol>
  <li>I've tried wrapping my component in the <code>Memory Router</code> </li>
  <li>Supply a redux store to the component  </li>
  <li>Used <code>.dive()</code> and <code>.chilndren()</code> to try and see the children</li>
  <li>Tried <code>mount</code> and <code>render</code> with no success. </li>
  </ol>
  
  <p>Still keeps rendering the <code>&lt;Route render={[Function: render]} /&gt;</code></p>
  
  <p>Trying out : </p>
  
  <pre><code>&lt;MemoryRouter&gt;
      &lt;Component {...props} /&gt;
  &lt;/MemoryRouter&gt;
  </code></pre>
  
  <p>Still produces the same result. 
  Note that I've also tried importing my component as </p>
  
  <pre><code>import { Component } from './components/'
  </code></pre>
  
  <p>But it returns undefined. </p>
  
  <p>Any help is deeply appreciated. Thank you! </p>