title: Shallow render with enzyme can't find elements
body: <p>I am trying to unit test one of my React components, but the Enzyme's shallow render method is saying it cannot find elements in the component. The component renders different navigation links depending on an authentication prop. </p>
  
  <p>Nav component: </p>
  
  <pre><code>    class Header extends Component {
  
        renderLoginNav() {
          switch(this.props.auth) {
              case null:
                  return;
              case false:
                  return (
                      &lt;li key={ 1 }&gt;&lt;a className="nav-link" href="/auth/google" 
                       id="google"&gt;Login&lt;/a&gt;&lt;/li&gt;
                  );
              default: 
                  return [
                      &lt;li key={ 2 } className="nav-item"&gt;
                          &lt;a className="nav-link" href="/lists"&gt;Dashboard&lt;/a&gt;&lt;/li&gt;,
                      &lt;li key={ 3 } className="nav-item"&gt;
                          &lt;a className="nav-link" href="/credits"&gt;Credits&lt;/a&gt;&lt;/li&gt;,
                      &lt;li key={ 4 } className="nav-item"&gt;
                          &lt;a className="nav-link" href="/api/logout"&gt;Logout&lt;/a&gt;&lt;/li&gt;
                  ];
          }
      }
      render() {
          return (
                  &lt;nav&gt;
                      &lt;ul&gt;
                          {this.renderLoginNav()}
                      &lt;/ul&gt;
                  &lt;/nav&gt;
          );
      }
  }
  function mapStateToProps(state) {
      return {
          auth: state.auth
      }
  }
  export default connect(mapStateToProps)(Header);
  </code></pre>
  
  <p>Enzyme Test: </p>
  
  <pre><code>import React from 'react';
  import { shallow, configure } from 'enzyme';
  import Adapter from 'enzyme-adapter-react-16';
  import configureStore from 'redux-mock-store';
  import Header from './';
  
  configure({ adapter: new Adapter() });
  const middlewares = [];
  const mockStore = configureStore(middlewares);
  it('displays correct nav when authenticated', () =&gt; {
          const initialState = { auth: {} };
          const store = mockStore(initialState);
          const wrapper = shallow(&lt;Header store={store} /&gt;);
  
          expect(wrapper.find('.nav-link').length).toBe(3);
      })
  </code></pre>
  
  <p>When this test runs, it fails saying "expected 0 to be 3". Am I misunderstand how the shallow render method works? Or is there a flaw in how my test is setup?</p>