title: How to spy componentWillMount using jest and enzyme
body: <p>I am trying to test whether componentWillMount was called and for that my test is</p>
  
  <pre><code>test('calls `componentWillMount` before rendering', () =&gt; {
    let fn = jest.fn(SomeComponent.prototype.componentWillMount)
    mount(&lt;SomeComponent /&gt;)
    expect(fn).toHaveBeenCalled()
  })
  </code></pre>
  
  <p>But even though the componentWillMount method is called, the test does not pass.
  What am I missing here?</p>