title: react state is not updating in jest
body: <p>In my react component I have two functions. handleChangeInput(e) is called on 'OnChange' of input field and checkFields() is called from handleChangeInput(e)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>constructor(){
      super()
      this.state={
        email: '',
        password:'',
        validFields: false
      }
    }
  
  handleChangeInput(e){
      const name = e.target.name;
      const value = e.target.value;
      this.setState({[name]: value},()=&gt;{
        this.checkFields();
      });
    }
  
    checkFields(){
      if (this.state.email.length&gt;0 &amp;&amp; this.state.password.length&gt;0 ) {
        this.setState({validFields: true});
      }else {
        this.setState({validFields: false});
      }
    }</code></pre>
  </div>
  </div>
  </p>
  
  <p>And in my index.test.js I have</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>describe('&lt;Login /&gt;', () =&gt; {
   
   describe('handleChangeInput', () =&gt; {
  
          const component = new Login()
          const wrapper = shallow(&lt;Login /&gt;);
  
          beforeEach(() =&gt; {
              component.setState = jest.fn()
          })
  
          test('calls setState validFields false when no email/password', () =&gt; {
              const state = { state : { email: '', password: ''} }
              const args = { target : { name: 'name', value: 'value' } }
              component.handleChangeInput.call(state, args)
              expect(component.setState.mock.calls.length).toBe(1)
              expect(wrapper.state().validFields).toEqual(false)
          })
  
          test('calls setState validFields true when email/password are ok', () =&gt; {
              const state = { state : { email: 'email', password: 'password' } }
              const args = { target : { name: 'name', value: 'value' } }
              component.handleChangeInput.call(state, args)
              expect(component.setState.mock.calls.length).toBe(1)
              expect(wrapper.state().validFields).toEqual(false)
          })
   })
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>But my state is not being updated. As a result, 'validFields' is not set to true and my second test is failing. I tried wrapper.update() and wrapper.instance().forceUpdate() but still no success. Any help would be appreciated</p>