Skip to content

Instantly share code, notes, and snippets.

@mikebridge
Created May 15, 2017 21:53
Show Gist options
  • Save mikebridge/ebeaebb5470f4ed34adeb75ea4e93f0d to your computer and use it in GitHub Desktop.
Save mikebridge/ebeaebb5470f4ed34adeb75ea4e93f0d to your computer and use it in GitHub Desktop.
JSON to add to package.json to enable Jest/Typescript debugging in IntelliJ
{
"jest": {
"transform": {
"^.+\\.css$": "react-scripts-ts/config/jest/cssTransform.js",
".(ts|tsx)": "react-scripts-ts/config/jest/typescriptTransform.js",
"^(?!.*\\.(css|json)$)": "react-scripts-ts/config/jest/fileTransform.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"setupTestFrameworkScriptFile": "<rootDir>/src/setupTests.ts",
"moduleNameMapper": {
"\\.(css)$": "react-scripts-ts/config/jest/cssTransform.js"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment