title: Mocking child component properties jest+enzyme+react
body: <p>I have a component I'm trying to mock the props child component it's referencing. The reasoning is I want to make sure the logic in my component is correctly set.</p>
  
  <p>Component:</p>
  
  <pre><code>class Toolbar extends Component {
      render() {
          return (
              &lt;ComponentA&gt;
                  &lt;ComponentB
                      onRenderItem={this.renderItem}
                  /&gt;
              &lt;/ComponentA&gt;
          );
      }
  
      renderItem() {
          return (
              &lt;ComponentC
                  onChange={(event) =&gt; {
                      // logic based on event
                      return anotherMethod;
                  }}
              /&gt;
          );
      }
  }
  </code></pre>
  
  <p>I was hoping to be use enzyme's <code>.setProps({...})</code> after I do a <code>.find()</code> to get the child component but that isn't supported.</p>
  
  <p>Test code looks like:</p>
  
  <pre><code>it('test', () =&gt; {
      const wrapper = mount(&lt;Toolbar/&gt;);
      const child = wrapper.find(ComponentC);
      const onChangeMock = jest.fn();
      child.setProps({onChange: onChangeMock}); // invalid
      child.props().onChange = onChangeMock; // invalid
  
      expect(onChangeMock.mock.calls.length).to.be(1);
      // additional validation to ensure my logic in component is correct
  });
  </code></pre>