title: How to use File.text() in jest?
body: <p>I have some problems to make some tests pass. After a few hours lost trying to figure out what is going on, I have realized that jest has some problem with <code>Files</code></p>
  <p>I have wrote a simple test, to expect over a file content:</p>
  <pre><code>describe(&quot;.file test&quot;, () =&gt; {
      test(&quot;jest can work whit files&quot;, async () =&gt; {
        const aContent = &quot;a_content&quot;;      
        const file = new File([aContent], &quot;aFile.txt&quot;);
        const fileContent = await file.text()
        expect(fileContent).toBe(aContent)
      })
   )
  </code></pre>
  <p>That simple code, work when is executed in the real aplication within a browser. However, when I launch the test suite, I just get an error:</p>
  <blockquote>
  <p>TypeError: file.text is not a function</p>
  </blockquote>
  <pre><code>  30 |       const aContent = &quot;a_content&quot;;
    31 |       const file = new File([aContent], &quot;aFile.txt&quot;);
  &gt; 32 |       const fileContent = await file.text()
       |                                      ^
    33 |       expect(fileContent).toBe(aContent)
  </code></pre>
  <p>So, what I need to jest can work with Files?</p>