title: React Testing Library: testing props sent to mocked child component
body: <p>using jest and react testing library.</p>
  <p>this seems so fundamental, yet i am missing it.  how do you mock out a child component, but test that parent is calling it with the correct props?  in this case i want to test parent.js and mock out the child component.</p>
  <p>parent.js</p>
  <pre><code>import Child from './child'
  const Parent = (props) =&gt; {
    const {firstname} = props;
  
    &lt;Child name={firstname} /&gt;
  }
  </code></pre>
  <p>test.js</p>
  <pre><code>import Parent from '../parent'
  jest.mock('./child');
  
  it('should render properly'), () =&gt; {
     render(&lt;Parent firstname='bob'/&gt;);
     expect('child').toBeCalledWith({ name: 'bob' });
  }
  </code></pre>