title: babel-jest with ES6 modules
body: <p>I'm happily using node 8.6 with the experimental ES6 modules option (--experimental-modules) turned on. This allows me to perfectly write plain ES2015 code for node without the need of babel.</p>
  
  <p>The problem is when I try to create some tests with jest, it fails complaining about a syntax error: "Unexpected token import".</p>
  
  <p>The .babelrc configuration is the following:</p>
  
  <pre><code>{
    "env": {
      "test": {
        "presets": [
          ["env", {
            "targets": {
              "node": "8.6"
            }
          }]
        ]
      }
    }
  }
  </code></pre>
  
  <p>My jest.config.js is as follows:</p>
  
  <pre><code>module.exports = {
    testMatch: ['/tests/**/*.js', '**/?(*.)test.js'],
  }
  </code></pre>
  
  <p>The error thrown:</p>
  
  <pre><code>    /app/tests/integration/controller/data-provider/Credentials/CredentialsList.action.test.js:2
      import { Credentials, AdWordsCredentials } from '../../../../../imports/models/data-provider/Credentials.mjs';
      ^^^^^^
  
      SyntaxError: Unexpected token import
  
        at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:305:17)
            at Generator.next (&lt;anonymous&gt;)
            at Promise (&lt;anonymous&gt;)
  </code></pre>
  
  <p>Relevant packages:</p>
  
  <ul>
  <li>babel-core@^6.26.0</li>
  <li>jest@^21.2.1</li>
  <li>babel-jest@^21.2.0</li>
  <li>babel-preset-env@^1.6.0</li>
  </ul>
  
  <p>Any help will be appreciated.
  Thanks :)</p>
  
  <p>UPDATE: I've tried calling jest without babel, with the following command, without any change: <code>node --experimental-modules node_modules/.bin/jest</code></p>