title: Fire (dispatch) custom event with react-testing-library
body: <p>Is there a way to fire a custom event with react-testing-library? I couldn't find such example in their docs.</p>
  <pre><code>useEffect(() =&gt; {
    document.body.addEventListener('customEvent', onEvent);
  }, []);
  </code></pre>
  <p>I want to fire custom event (sth. like <code>fireEvent('customEvent')</code> and test if <code>onEvent</code> was called.</p>