title: Jest spy on functionality
body: <p>I am swapping to Jest from Mocha, and I'm wondering if there is a way to spy on a React method. For example, let's say I have the following method in my component (ignore the <code>sdk</code> library, it just constructs a jQuery Ajax call):</p>
  
  <pre><code>getData() {
      sdk.getJSON('/someURL').done(data =&gt; {
          this.setState({data});
      });
  }
  </code></pre>
  
  <p>Using Sinon I would test this by spying on the prototype like so:</p>
  
  <pre><code>it('should call getData', () =&gt; {
      sinon.spy(Component.prototype, 'getData');
      mount(&lt;Component /&gt;);
      expect(Component.prototype.getData.calledOnce).to.be.true;
  });
  </code></pre>
  
  <p>This would ensure code coverage without mocking the method. Is there similar functionality in Jest?</p>
  
  <p>EDIT: Also, if this functionality doesn't exist, what is the next best strategy for testing API calls?</p>