title: react-testing-library, check if component method was called
body: <p>Using <code>'@testing-library/react'</code>,</p>
  
  <p>given the following component:</p>
  
  <pre><code>const Home = () =&gt; {
     const submit = () =&gt; console.log('submit clicked');
  
     return (
       &lt;div&gt;
         Home
        &lt;Button
          onClick={submit}
        &gt;
          Submit
        &lt;/Button&gt;
       &lt;/div&gt;
     )
  }
  </code></pre>
  
  <p>What assertion is necessary to add in order to finish the test below?</p>
  
  <pre><code>it('reacts to a submit event', async () =&gt; {
      const { getByText } = render(&lt;Home /&gt;);
  
      fireEvent.click(getByText(/submit/i));
    })
  </code></pre>