title: Enzyme does not reflect state update
body: <p>I am writing tests for a React component connected to a Redux store. What I want to test is that when I dispatch <code>reset</code> on the store, the component state gets back to default.</p>
  
  <p>The idea is as follows: when RESET dispatched, the component receives the truthy reset property and in <code>componentWillReceiveProps</code> sets the component state to default. It works, but it does not pass the test. If I hook up the debugger and run the test, I can see that it goes through setting state in <code>componentWillReceiveProps</code> but then when I expect the <code>timeLeft</code> state to be 10000, it is still 1111 as set above. What am I missing? This might be not a perfect way to test but I am sort of new to React/Redux component testing and would be happy to hear best practices to improve the way I test it.</p>
  
  <p>Reducer:</p>
  
  <pre><code>const resetReducer = (state, action) =&gt; (action.type === 'RESET');
  </code></pre>
  
  <p>Component:</p>
  
  <pre><code>class Timer extends React.Component {
    componentWillReceiveProps(next) {
      if (next.reset) {
        this.setState({
          timeLeft: 10000,
        });
      }
  }
  
  function mapStateToProps(state) {
    return {
      reset: state.reset
    }
  }
  
  export default connect(mapStateToProps)(Timer);
  </code></pre>
  
  <p>Test:</p>
  
  <pre><code>it('Reset', () =&gt; {
      // use mount because I need componentWillReceiveProps to run
      const wrapper = mount(&lt;Timer/&gt;);
  
      wrapper.setState({
        timeLeft: 1111
      });
  
      store.dispatch({ type: 'RESET' });
      wrapper.update();
  
      expect(wrapper.state('timeLeft)).toBe(10000);
  });
  </code></pre>