Skip to content

Instantly share code, notes, and snippets.

@dylansmith
Created June 5, 2017 11:13
Show Gist options
  • Save dylansmith/a94d729cb29e07826e3ba14af872f4e9 to your computer and use it in GitHub Desktop.
Save dylansmith/a94d729cb29e07826e3ba14af872f4e9 to your computer and use it in GitHub Desktop.
jest config for TypeScript
{
"jest": {
"testEnvironment": "node",
"transform": {
"^.+\\.ts$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "test/.*\\.(ts)$",
"modulePaths": ["<rootDir>/src"],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"json"
],
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.ts",
"!src/types/*.ts"
],
"coverageReporters": [
"html",
"text",
"text-summary"
],
"coverageThreshold": {
"global": {
"branches": 90,
"functions": 90,
"lines": 90,
"statements": 90
}
},
"mapCoverage": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment