title: How do I test updating window history in useEffect hook with Jest
body: <p>I'm having trouble figuring out how to test this in Jest. I've explored mocking the useEffect, but have not had success.</p>
  
  <pre><code>useEffect(() =&gt; {
      if (window != undefined) {
          window.history.pushState({
              id: 'myId'
          }, 'yes', getValue(myArg));
      }
  }, [myArg]);
  </code></pre>