title: jest: document is not defined & puppeteer
body: <p>I have setup test environment for puppeteer, as described in doc, but suddenly got the error with usual test with <code>react-test-renderer</code></p>
  
  <pre><code>componentDidMount() {
      document.addEventListener('mousemove', this.handleMouseMove);
  }
  </code></pre>
  
  <p>As I've read suggestions for the error - <code>testEnvironment</code> should be set to <code>jsdom</code> but it's set to <code>NodeEnvironment</code> ansector class.
  (<a href="https://jestjs.io/docs/ro/puppeteer" rel="nofollow noreferrer">https://jestjs.io/docs/ro/puppeteer</a>)</p>
  
  <p>How to have both types of tests worked?</p>