title: How to get Jest to Ignore undefined error for named ESM default exports
body: <p>I have a React application that I am currently writing tests out for with Jest. It's a large project with over a 100 components, some of which are exported as a default with this syntax</p>
  <pre><code>export default SomeAwesomeComponent = () =&gt; {
      return (
          &lt;div&gt;
              ...
          &lt;/div&gt;
      )
  }
  </code></pre>
  <p>This has never affected simply running the application, however when I run jest, jest --watchAll, I get an error for that component <em><strong>ReferenceError: SomeAwesomeComponent is not defined</strong></em>.  I understand the difference between named and default exports, as well as how to use them. I can get this working by either</p>
  <p><strong>A</strong>. removing the name, leaving the 'default export' bit</p>
  <pre><code>export default () =&gt; {
      return (
          &lt;div&gt;
              ...
          &lt;/div&gt;
      )
  }
  </code></pre>
  <hr />
  <p><strong>B.</strong> declaring SomeAwesomeComponent as a const and than using that as the default export at the end of the file.</p>
  <pre><code>const SomeAwesomeComponent = () =&gt; {
          return (
              &lt;div&gt;
                  ...
              &lt;/div&gt;
          )
      }
  
  export default SomeAwesomeComponent;
  </code></pre>
  <hr />
  <p><strong>Given that there are so many components though, not all as default exports but quite a few, it would be very tedious to go through and fix each one. I mean, I will if I need to and eventually will, but for the sake of time, is there a way that I can configure Jest to ignore this error when running tests?</strong></p>