title: Jest: SyntaxError: Unexpected token export
body: <p>When I run my jasmine test with Jest I get an error:</p>
  <pre><code>G:\git\diamant\SpaUI\node_modules\linqts\dist\src\index.js:10
      export { default as List } from './list';
      ^^^^^^
  
      SyntaxError: Unexpected token export
  
      &gt; 1 | import { List } from 'linqts';
          | ^
        2 | import { ReportMessageData } from './../models/report.model';
        3 | import { TranslateService } from '@ngx-translate/core';
        4 | import { Injectable } from '@angular/core';
  
        at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1350:14)
        at Object.&lt;anonymous&gt; (src/app/feature-modules/report/services/report-message-flatten.service.ts:1:1)
  </code></pre>
  <p>I understand that I have to tell Jest to transform the code to plain Javascript, but I don't know how to do it.
  My <code>jest.config.js</code> looks as follows:</p>
  <pre><code>var preset = require(&quot;jest-preset-angular/jest-preset&quot;);
  module.exports = {
      ...preset,
      preset: &quot;jest-preset-angular&quot;,
      transformIgnorePatterns: [&quot;&lt;rootDir&gt;/node_modules/(?!linqts)&quot;],
      testMatch: [&quot;**/*.test.ts&quot;],
      globals: {
          ...preset.globals,
          &quot;ts-jest&quot;: {
              ...preset.globals[&quot;ts-jest&quot;],
              tsConfig: &quot;src/tsconfig.test.json&quot;,
              isolatedModules: true
          }
      },
      moduleNameMapper: {
          '^@diamant/feature-modules(.*)$': '&lt;rootDir&gt;/src/app/feature-modules/$1',
      }
  };
  </code></pre>