title: Unable to stimulate change event in child component React redux jest
body: <p>I am new to react redux and I am trying to unit test FormContainer component. But I am unable to simulate change event on Form component using enzyme or jest. In wrapper.instance() I am receiving null but I dont' think that should. If not then what is correct way of testing FormContainer.js file, because when I ran test coverage it showed me that change function was uncovered.</p>
  
  <p>FormContainer.js</p>
  
  <pre><code>import React, { Component } from "react";
  import { connect } from "react-redux";
  import Form from "../components/Form";
  import { isNumeric } from "../utils";
  
  class FormContainer extends Component {
    constructor(props) {
      super(props);
  
      this.state = {
        number: "",
        error: false
      };
    }
    // componentWillReceiveProps(nextProps) {
    //   console.log(nextProps, this.props, "main component");
    // }
  
    change = event =&gt; {
      let value = event.target.value;
      if (isNumeric(value) &amp;&amp; value &lt; 1001 &amp;&amp; value &gt;= 0) {
        if (value === "0") {
          this.setState({
            ...this.state,
            error: true
          });
          return;
        } else {
          this.setState({
            ...this.state,
            [event.target.name]: value,
            error: false
          });
        }
      } else {
        this.setState({ ...this.state, error: true });
      }
    };
  
    render() {
      return (
        &lt;Form change={this.change} value={this.state} error={this.state.error} /&gt;
      );
    }
  }
  const mapStateToProps = state =&gt; {
    return { ...state };
  };
  
  export default connect(mapStateToProps)(FormContainer);
  
  </code></pre>
  
  <p>FormContainer.test.js</p>
  
  <pre><code>import React from 'react';
  import configureStore from "redux-mock-store";
  import { shallow,mount } from 'enzyme';
  import FormContainer from '../../containers/FormContainer';
  import { findByAttr } from '../../utils';
  import Form from '../../components/Form';
  
  describe("Testing Form container", () =&gt; {
      let wrapper;
      let store;
      beforeEach(() =&gt; {
          const initialState = {}
          const mockStore = configureStore();
          store = mockStore(initialState);
          wrapper = shallow(&lt;FormContainer store={store} /&gt;);
      });
      it("Should render without error ", () =&gt; {
          expect(wrapper.exists()).toBe(true);
      });
  
      it("Simulate change", () =&gt; {
          let component = wrapper.find(Form);
          const mockChange = jest.fn();
          wrapper.instance().change = mockChange;
      });
  });
  </code></pre>
  
  <p>Testing Form container › Simulate change</p>
  
  <pre><code>TypeError: Cannot set property 'change' of null
  
    22 |         let component = wrapper.find(Form);
    23 |         const mockChange = jest.fn();
  &gt; 24 |         wrapper.instance().change = mockChange;
       |         ^
    25 |     });
    26 | });
  
    at Object.&lt;anonymous&gt; (src/__test__/containers/FormContainer.test.js:24:9)
  </code></pre>