title: Is there a way to spy/mock using Jest on fat arrow class instance methods for React components?
body: <p>I have a <code>handleClick</code> function: </p>
  
  <pre><code>handleClick = tagIndex =&gt; {
      console.log(tagIndex)
      if (tagIndex &gt;= 0 &amp;&amp; tagIndex &lt; this.state.suggestedTags.length)
          this.state.suggestedTags.splice(tagIndex, 1);
  } 
  </code></pre>
  
  <p>inside of my React class and I'm not able to mock or spy on it properly.</p>
  
  <p>I'm currently trying this</p>
  
  <pre><code>it('should call handleClick when a tag is clicked', () =&gt; {
          wrapper.setState({ suggestedTags: ['Mozart'] })
          const spy = jest.spyOn(component, 'handleClick')
          component.forceUpdate()
          wrapper.find('.suggested-tags__item').simulate('click')
          expect(spy).toHaveBeenCalled()
      })
  </code></pre>
  
  <p>but all I get back is <code>Expected mock function to have been called</code></p>