title: Jest fails to transpile import from npm linked module
body: <p>I have a project with multiple modules (using <a href="http://lernajs.io" rel="noreferrer">Lerna</a>) and I want to use Jest to run tests. However, when I test code that uses a shared module (npm linked module via Lerna) it seems that Babel is not correctly applied and I get the following error:</p>
  
  <pre><code>SyntaxError: Unexpected token import
  </code></pre>
  
  <p>The structure of my project is like this:</p>
  
  <pre><code>- my-project
  |- shared
  |- native
  |- web
  </code></pre>
  
  <p><code>web</code> and <code>native</code> require the <code>shared</code> module. When I go into the <code>shared</code> directory and run the local tests in Jest everything works fine. If I run Jest tests in the <code>web</code> directory the above error occurs as soon as I include something from <code>shared</code>.</p>
  
  <p>Here is a super simple test that causes the error:</p>
  
  <pre><code>import { util } from 'shared';
  
  it('returns false if not prod', () =&gt; {
      expect(util.isProd()).toBe(false);
  });
  </code></pre>
  
  <p>My <code>.babelrc</code> looks like this:</p>
  
  <pre><code>{
      "presets": [
          "env",
          "flow",
          "react"
          ],
      "plugins": [
          "flow-react-proptypes",
          "transform-object-rest-spread",
          "transform-class-properties"
      ]
  }
  </code></pre>
  
  <p>I tried everything I could find, including:</p>
  
  <ul>
  <li>Different Babel configs, including one with the <code>es2015</code> preset and enabling <code>modules</code> for the test environment</li>
  <li>Manually setting the <code>transform</code> option for babel-jest</li>
  <li>As mentioned, Jest can be executed in the <code>shared</code> module, thus, Jest and <code>babel-jest</code> are installed there as well.</li>
  </ul>