title: Stubbing window functions in Jest
body: <p>In my code, I trigger a callback upon "OK" click of a <code>window.confirm</code> prompt, and I want to test that the callback is triggered.</p>
  
  <p>In <code>sinon</code>, I can stub the <code>window.confirm</code> function via:</p>
  
  <pre><code>const confirmStub = sinon.stub(window, 'confirm');
  confirmStub.returns(true);
  </code></pre>
  
  <p>Is there a way I can achieve this stubbing in Jest?</p>