title: Jest: Testing window.location.reload
body: <p>How do I write a test that makes sure that the method <code>reloadFn</code> does in fact reload the window? I found <a href="https://gist.github.com/remarkablemark/5cb571a13a6635ab89cf2bb47dc004a3" rel="noreferrer">this resource</a> but I am unclear on how to expect a window reload when writing a test when that window reload happens in a given function. Thanks for the help!</p>
  
  <pre><code>const reloadFn = () =&gt; {
    window.location.reload(true);
  }
  </code></pre>