title: How to get value of react app state['Key'] in test?
body: <p>I'm trying to make an test for a react application, but I have run into a problem. I couldn't get <code>jest</code> to work properly so I have been trying to work around it which has caused my current problem. The reason my test isn't working is because the way I'm calling for the values of the keys in state requires me to be using <code>enzyme</code> in <code>jest</code>. Is their a way to get the values of the keys in state inside the react app without using jest and how do I do it?</p>
  
  <p>this is the function in my react app:</p>
  
  <pre><code>setTimeMonth = (time) =&gt; {
      const today = moment().format('YYYY-MM-DD');
      const before = moment().subtract(time, 'months').format('YYYY-MM-DD');
      this.setState({Date2: today});
      this.setState({Date1: before});
  }
  </code></pre>
  
  <p>this is the test for the function:</p>
  
  <pre><code>it('setTimeMonth(number)', () =&gt; {
    const wrapper = new ReactPage;
    expect(wrapper.state('Date1').toMatch(""));
    expect(wrapper.state('Date2').toMatch(""));
    wrapper.setTimeMonth(1);
    expect(wrapper.state('Date1').toMatch(moment().format('YYYY-MM-DD')));
    expect(wrapper.state('Date2').toMatch(moment().subtract(1, 'Month').format('YYYY-MM-DD')));
  });
  </code></pre>