title: Testing ES6 class with Jest throws 'not a constructor' error
body: <p>I found a similar problem <a href="https://stackoverflow.com/questions/49226551/jest-cannot-create-objects-from-imported-classes">here</a>, but there doesn't seem to be an answer.</p>
  
  <p>I'm trying to test an ES6 class using Jest, like so:</p>
  
  <pre><code>// src/myclass.js
  export default class MyClass {
      constructor(options) {
          // currently this is empty while I debug this problem
      }
  }
  </code></pre>
  
  <p>and the test:</p>
  
  <pre><code>// test/myclass.test.js
  import { MyClass } from '../src/myclass.js';
  
  describe("Test Constructor", () =&gt; {
  
      test("doesn't throw error when constructed", async () =&gt; {
          expect(() =&gt; {
              const testMyClass = new MyClass();
          }).not.toThrowError();
      }
  
  });
  </code></pre>
  
  <p>When I run the test, Jest throws an error saying:</p>
  
  <blockquote>
    <p>TypeError: _myClass.MyClass is not a constructor</p>
  </blockquote>
  
  <p>My best guess is that this is an issue with the babel config, but I can't seem to figure it out. If I change <code>MyClass</code> to a function instead of a class and drop the export/import (i.e., the pre-class way of doing things) then it works as expected.</p>
  
  <p>Here's my config in package.json:</p>
  
  <pre><code>"devDependencies": {
      "@babel/core": "^7.1.2",
      "@babel/preset-env": "^7.1.0",
      "babel-core": "^7.0.0-bridge.0",
      "gulp": "^3.9.1",
      "gulp-babel": "^8.0.0",
      "gulp-jest": "^4.0.2",
      "gulp-rename": "^1.4.0",
      "gulp-uglify": "^3.0.1",
      "jest": "^23.6.0",
      "jest-cli": "^23.6.0",
      "pump": "^3.0.0",
      "regenerator-runtime": "^0.12.1"
    },
    "babel": {
      "presets": [
        "@babel/preset-env"
      ]
    },
    "jest": {
      "testPathIgnorePatterns": [
        "&lt;rootDir&gt;/node_modules/",
        "&lt;rootDir&gt;/test/._*.test.js"
      ],
      "testEnvironment": "jsdom",
      "setupFiles": [
        "&lt;rootDir&gt;/src/myclass.es6.js"
      ]
    }
  </code></pre>