title: Jest mock onPress for react native
body: <p>I have a function that I can test because it is exported, ie. </p>
  
  <pre><code>const export myFunction = parameters =&gt; mockableFunction(parameters);
  </code></pre>
  
  <p>but when I use it in an <code>onPress</code> event that takes a parameter, I have to create an anonymous function like this:</p>
  
  <pre><code>&lt;Button onPress={ () =&gt; myFunction(parameters) } /&gt;
  </code></pre>
  
  <p>How do I go about testing the anonymous function generated in the button component? It seems trivial but it's lowering my coverage, which is required. </p>