title: Importing `constants` in Jest tests with named imports
body: <p>I have a <code>config</code> and <code>constants</code> folder in my project. Located in <code>src\config\test.ts</code> &amp; <code>src\constants\index.js</code> respectively.</p>
  
  <p>I've setup Jest to use <code>moduleNameMapper</code> as below so I can just do <code>import config from 'config'</code> and <code>import { SOME_CONST } from 'constants'</code></p>
  
  <pre><code>"moduleNameMapper": {
    "config$": "&lt;rootDir&gt;/src/config/test.js",
    "constants$": "&lt;rootDir&gt;/src/constants/index.js"
  }
  </code></pre>
  
  <p>However, in my tests any files which use <code>import { SOME_CONST } from 'constants'</code> always get an <code>undefined</code> value for <code>SOME_CONST</code> whereas any which us the default export from <code>config</code> work fine.</p>
  
  <p>Is this a known issue? Am I doing something wrong here? can't seem to pin it down.</p>