Configure Jest for TS

This commit is contained in:
Maciej Ziarkowski 2019-08-12 10:24:08 +01:00
parent 4421930942
commit fb70b2bf64

View File

@ -55,5 +55,25 @@
"tslint": "^5.18.0", "tslint": "^5.18.0",
"tslint-react": "^4.0.0", "tslint-react": "^4.0.0",
"typescript": "^3.5.3" "typescript": "^3.5.3"
},
"jest": {
"transform": {
"\\.(ts|tsx)$": "ts-jest",
"\\.css$": "<rootDir>/node_modules/razzle/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/node_modules/razzle/config/jest/fileTransform.js"
},
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.(ts|js)?(x)",
"<rootDir>/src/**/?(*.)(spec|test).(ts|js)?(x)"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json"
],
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}"
]
} }
} }