Skip to content

Instantly share code, notes, and snippets.

@darcien
Created January 17, 2019 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save darcien/770a9c2f8cec8ce1badab8804a954702 to your computer and use it in GitHub Desktop.
Save darcien/770a9c2f8cec8ce1badab8804a954702 to your computer and use it in GitHub Desktop.
Jest configuration for RN with expo
{
"jest": {
"preset": "jest-expo",
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js",
"^.+\\.tsx?$": "ts-jest"
},
"testMatch": [
"**/__tests__/**/*.ts?(x)",
"**/?(*.)+(spec|test).ts?(x)"
],
"testPathIgnorePatterns": [
"<rootDir>/node_modules/"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"ios.ts",
"ios.tsx",
"android.ts",
"android.tsx"
],
"globals": {
"ts-jest": {
"tsConfig": {
"jsx": "react"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment