title: isolatedModules error on Jest test with Create React App and TypeScript?
body: <p>I've started a Create React App project with --typescript. When I write a test Im getting a compiler error:</p>
  
  <pre><code>// something-test.tsx
  test('something', ()=&gt;{
    expect(1).toBe(1)
  })
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>TS1208: All files must be modules when the '--isolatedModules' flag is provided. </p>
  </blockquote>
  
  <p>From googling I thought the fix was to create a jest.config.tsx with:</p>
  
  <pre><code>module.exports = {
    roots: ["&lt;rootDir&gt;/src"],
    transform: {
      "^.+\\.tsx?$": "ts-jest"
    },
    testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
    moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"]
  };
  </code></pre>
  
  <p>However it's made no difference. </p>