title: Cannot navigate to path using MemoryRouter while testing
body: <p>I have followed the examples closely but I cannot get the <strong>MemoryRouter</strong> (is this how you are supposed to test route components?) to work with a test using jest and enzyme.</p>
  
  <p>I would like to navigate to one of the routes, and have that reflected in my snapshot. The code below attempts to navigate using MemoryRouter to "/A" so I assume I would see <code>&lt;div&gt;A&lt;/div&gt;</code></p>
  
  <pre><code>import React from 'react';
  import Enzyme, {mount} from 'enzyme';
  import Adapter from 'enzyme-adapter-react-16';
  import {BrowserRouter as Router, MemoryRouter, Route, Switch} from 'react-router-dom';
  
  Enzyme.configure({adapter: new Adapter()});
  
  describe('Routing test', () =&gt; {
      let wrapper;
  
      beforeEach(() =&gt; {
          wrapper = mount(
              &lt;MemoryRouter initialEntries={["/A"]}&gt;
                      &lt;div className={"Test"}&gt;This is my Test Component and should not have any test specific code in it
                          &lt;Router&gt;
                              &lt;Switch&gt;
                                  &lt;Route path={"/A"}&gt;
                                      &lt;div className={"A"}&gt;A&lt;/div&gt;
                                  &lt;/Route&gt;
                                  &lt;Route path={"/B"}&gt;
                                      &lt;div&gt;B&lt;/div&gt;
                                  &lt;/Route&gt;
                              &lt;/Switch&gt;
                          &lt;/Router&gt;
                      &lt;/div&gt;
                  &lt;/MemoryRouter&gt;
          );
      });
      afterEach(() =&gt; {
          wrapper.unmount();
      });
  
      it('matches snapshot', () =&gt; {
          expect(wrapper.find(".Test")).toHaveLength(1); //this ok
          expect(wrapper.find(".A")).toHaveLength(1); //but this is not ok :( It should find  A
      });
  });
  </code></pre>
  
  <p>Instead of seeing <code>&lt;div&gt;Test&lt;div&gt;A&lt;/div&gt;&lt;/div&gt;</code> I just see <code>&lt;div&gt;Test&lt;/div&gt;</code></p>
  
  <p><strong>NOTE:</strong> My example is simplified into one class. My real world situation is that <code>&lt;div&gt;Test...&lt;/div&gt;</code> is a seperate component.</p>