title: Testing for component/props is undefined with Enzyme in ReactJS
body: <p>I'm trying to test if the LoginContainer component via props exists in the Header with Enzyme, but I'm not having luck.</p>
  
  <p>Here's my main app:</p>
  
  <pre><code>import React from 'react'
  import Header from '../components/Header'
  import LoginContainer from './LoginContainer'
  
  const App = () =&gt; (
      &lt;Header login={&lt;LoginContainer /&gt;} /&gt;
  )
  export default App
  </code></pre>
  
  <p>My Header:</p>
  
  <pre><code>import React from "react";
  const Header = ({login}) =&gt;
      &lt;header role="banner"&gt;
          {login}
      &lt;/header&gt;
  export default Header
  </code></pre>
  
  <p>And this is my Test:</p>
  
  <pre><code>import React from 'react'
  import { shallow } from 'enzyme'
  import Header from '../components/Header'
  
  const setup = props =&gt; {
      const component = shallow(
          &lt;Header {...props} /&gt;
      )
      return {
          component: component
      }
  }
  describe('Header component', () =&gt; {
      it('should render login', () =&gt; {
          const { component } = setup();
          console.log(component.props({ login })) //this is undefined
      })
  })
  </code></pre>
  
  <p>The problem is when I run the test it seems that login(LoginContainer) props is undefined. Can someone advice please?</p>