title: innerText is undefined in jest test
body: <p>When testing using jest I saw that the property <code>innerText</code> is undefined while not in test it has the right value.</p>
  
  <pre><code>  it('get text from div', () =&gt; {
      const div = document.createElement('DIV')
      div.innerHTML = '&lt;br&gt;a&lt;br&gt;b&lt;br&gt;c'
      console.log('innerText', div.innerText) // undefined
      console.log('textContent', div.textContent) // 'abc'
      // expect(getTextFromDiv(div).length).toMatchSnapshot()
    })
  </code></pre>
  
  <p>But when using the same code not in jest test, the innerText shows :</p>
  
  <pre><code>'a
  
  b
  
  c'
  </code></pre>
  
  <p>and textContent is <code>'abc'</code>.</p>
  
  <p>Why innerText in jest is undefined and when it's not in a jest than the value is real?</p>
  
  <p>This is the code where it works (not in jest):</p>
  
  <pre><code>const addTextInRichTextToPdf = (doc, text, offsetY) =&gt; {
    const div = document.createElement('DIV')
    div.innerHTML = '&lt;br&gt;a&lt;br&gt;b&lt;br&gt;c'
    console.log('innerText', div.innerText) // print the real value
    console.log('textContent', div.textContent) // 'abc'
    ...
  </code></pre>