In a Jest test where does the window object come from?
<p>I have a simple Jest test:</p>

<pre><code>describe('test', function() {
  beforeEach(function() {});
  it('test', function() {
    console.log(window.document); //a real or nearly real document
  });
});
</code></pre>

<p>I'm requiring a few modules e.g. bootstrap - but nothing that looks like it might provide a window object - with a document object on it.</p>

<p>My question is - who/what is providing this window (and window.document) object? The window object is similar to a browser window - albeit missing one or two methods. But I don't see who is providing it. I don't know enough about node.js and webpack (the tests are being built with webpack) to know where to start. </p>

<p>It isn't ReactDOM. Is it Jest? Or node?</p>