How can I test a React Native component behaviour and props using Jest?
<p>I have successfully set up the Jest test environment in a React Native component that draws a <code>Button</code> (basically a combination of <code>Touchable</code> and <code>Text</code> components).</p>

<p>I can run snapshot tests like the following:</p>

<pre><code>test('Renders', () =&gt; {
  const component = renderer.create(
    &lt;Button&gt;
      Button
    &lt;/Button&gt;
  )
  const tree = component.toJSON()
  expect(tree).toMatchSnapshot()
})
</code></pre>

<p>However, I want to make a step further and start testing the <code>props</code> of the component (i.e., checking that the <em>Button</em> text is passed as <code>props.children</code> and I also want to test the <code>onPress</code> functionality, simulating the user tap and checking that a passed function is called.</p>

<p>How can I do this with a Jest + React Native environment?</p>

<p>PS: I'm currently running this code with <code>react-native ~&gt; v0.34</code>, <code>jest ~&gt; v15.1.1</code> and <code>jest-react-native ~&gt; v15.0.0</code>.</p>