title: Return null in Jest test in someComponent
body: <p>Im new to testing react-native code using jest and I want to achieve this simple test. I have the following code and I want to test that if <code>data === '0'</code> then return value <code>null</code>.</p>
  
  <pre><code>export class Test extends Component {
  ...
    _renderRow (data) {
      if (data === '0') {
        return null
      }
  
      return //other item
    }
  ...
  }
  </code></pre>
  
  <p>I tried the following test, but its still reading the <code>return //other item</code> since there is a data variable on it.</p>
  
  <pre><code>const _renderRowSpy = jest.spyOn(Feed.prototype, '_renderRow')
    it('should be null', () =&gt; {
      function callback(data) {
        expect(data.type()).to.equal(null);
      }
      _renderRowSpy(callback);
    });
  </code></pre>