title: Is componentDidMount supposed to run with shallow rendering in Enzyme?
body: <p>From my understanding and from what I have read so far in various answers, not all lifecycle methods are supposed to be run with shallow rendering. Especially <code>componentDidMount</code></p>
  
  <p>However, I notice that when I do </p>
  
  <pre><code>  beforeEach(function () {
      fakeComponentDidMount = sinon.stub(Component.prototype, 'componentDidMount');
      fakeComponentDidMount.callsFake(function () {});
      wrapper = shallow(&lt;Component {...props} /&gt;);
    });
  
    afterEach(function () {
      fakeComponentDidMount.restore();
    });
  
    it('calls componentDidMount', function () {
      expect(fakeComponentDidMount.called).to.equal(true);
    });
  </code></pre>
  
  <p>the test passes. </p>
  
  <p>So, am I doing something wrong here or have I understood something wrong?</p>
  
  <p><a href="https://github.com/airbnb/enzyme/issues/465#issuecomment-227697726" rel="noreferrer">For reference</a></p>