title: How to mock the HTML5 File object with Jest
body: <p>I have a lot of code passing around HTML 5 file objects.  I wrote a suite of tests for it, however, it breaks my snapshot testing because of the File objects last modified date.</p>
  
  <p>I attempted to mock using:</p>
  
  <pre><code>jest.mock('File', () =&gt; {
      return class MockFile {
          filename: string;
  
          constructor(parts: (string | Blob | ArrayBuffer | ArrayBufferView)[], filename: string, properties?: FilePropertyBag) {
              this.filename = filename;
          }
      }
  });
  </code></pre>
  
  <p>I get errors saying the File module isn't found (I don't need to import it anywhere I use it...)</p>
  
  <p>I also tried extending the file class and overriding the lastmodified get property, and it didn't seem to fix my snapshots.</p>
  
  <p>What's the best way to handle this?</p>