title: Jest error with css files
body: <p>I am trying to get my first Jest Test to pass with React and Typescript.</p>
  
  <p>I am getting the following error:</p>
  
  <pre><code>({"Object.&lt;anonymous&gt;":function(module,exports,require,__dirname,__filename,global,jest){.App {
                                                                                           ^
  
  SyntaxError: Unexpected token .
  
    12 |           &lt;h1 className="App-title"&gt;Welcome to React&lt;/h1&gt;
    13 |         &lt;/header&gt;
  &gt; 14 |         &lt;p className="App-intro"&gt;
    15 |           To get started, edit &lt;code&gt;src/App.tsx&lt;/code&gt; and save to reload.
    16 |         &lt;/p&gt;
    17 |       &lt;/div&gt;
  
    at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)
    at Object.&lt;anonymous&gt; (src/App.tsx:14:1)
    at Object.&lt;anonymous&gt; (src/App.test.tsx:5:13)
  </code></pre>
  
  <p>My package.json config for jest look like this:</p>
  
  <pre><code>          {
          "name": "test-react",
          "version": "0.1.0",
          "private": true,
          "dependencies": {
            "@types/react-redux": "^6.0.2",
            "react": "^16.4.1",
            "react-dom": "^16.4.1",
            "react-redux": "^5.0.7",
            "react-scripts-ts": "2.16.0",
            "redux": "^4.0.0"
          },
          "scripts": {
            "start": "react-scripts-ts start",
            "build": "react-scripts-ts build",
            "test": "react-scripts-ts test --env=jsdom",
            "eject": "react-scripts-ts eject",
            "precommit": "lint-staged"
          },
          "lint-staged": {
            "*.tsx": [
              "tslint --fix",
              "git add"
            ]
          },
          "test": "jest",
          "devDependencies": {
            "@types/enzyme": "^3.1.10",
            "@types/jest": "^23.1.0",
            "@types/node": "^10.3.3",
            "@types/react": "^16.3.18",
            "@types/react-dom": "^16.0.6",
            "enzyme": "^3.3.0",
            "eslint-plugin-react": "^7.9.1",
            "husky": "^0.14.3",
            "lint-staged": "^7.2.0",
            "react-addons-test-utils": "^15.6.2",
            "typescript": "^2.9.2"
          }
        }
  </code></pre>
  
  <p>My jest.config.js look like this: </p>
  
  <pre><code>   module.exports = {
      "roots": [
          "./src"
      ],
      "transform": {
          "^.+\\.tsx?$": "ts-jest"
      },
      "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
      "moduleNameMapper": {
          "^.+\\.scss$": "identity-obj-proxy"
      },
      "moduleFileExtensions": [
          "ts",
          "tsx",
          "js",
          "json"
      ]
  }
  </code></pre>
  
  <p>I run tests with <code>npx jest</code> and got this error.</p>
  
  <p>Jest: ^23.1.0</p>
  
  <p>React: ^16.3.18 </p>
  
  <p>I've tried many solutions from stackoverflow and none of them helped me, I hope for your help</p>