title: React test; how to mock componentDidMount or overwrite it?
body: <p>I'm trying to test a react component.</p>
  
  <pre class="lang-js prettyprint-override"><code>var Component = React.createClass({
  
    componentDidMount: function () {
  
      return this.setState({
        name: 'blabla'
      });
    },
  
    render: function () {
  
      return (
        &lt;h1&gt;{this.state.name}&lt;/h1&gt;
      );
    }
  });
  </code></pre>
  
  
  
  <p>Is there a way, during testing, to mock what <code>componentDidMount</code> returns or does? That would leave me to test it on it's own and just test the component render behaviour.</p>
  
  <p>Thanks!</p>