title: How to use import a module from typescript file within jest test file
body: <p>I use <code>jest</code> to test my <code>typescript</code> codes. </p>
  
  <p></p>
  
  <pre><code>import ClassA from '../classA';
  jest.mock('../classA');
  </code></pre>
  
  <p>When I <code>import</code> a <code>class</code> from my <code>classA.ts</code> file, <code>jest</code> gives me an error:</p>
  
  <pre><code>export default ClassA;
  ^^^^^^
  SyntaxError: Unexpected token export
  </code></pre>
  
  <p>here is my <code>jest</code> config in <code>package.json</code>:</p>
  
  <pre><code>"devDependencies": {
    "@types/jest": "^19.2.3",
    "jest": "^20.0.4",
    "ts-jest": "^20.0.4",
    "ts-node": "^3.0.2",
    "typescript": "^2.3.2"
  },
  "jest": {
    "transform": {
      ".(ts|tsx)": "&lt;rootDir&gt;/node_modules/ts-jest/preprocessor.js"
    },
    "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "json"
    ]
  }
  </code></pre>