title: Check if window.location.reload is invoked in JEST
body: <pre><code>const ErrorSnackbar = () =&gt; {
  
       const handelePrimaryBtnClick = () =&gt; { window.location.reload() }
  
       return ( &lt;div className = 'sample_class' onClick={handelePrimaryBtnClick}&gt; Sample Code &lt;/div&gt; )
  }
  </code></pre>
  
  <p>In jest How to check if window.location.reload() is invoked when I click on the div.</p>