Skip to content

Instantly share code, notes, and snippets.

@sstur
Forked from darcien/package.json
Last active September 25, 2019 10:39
Show Gist options
  • Save sstur/a9204e24b9ffb1a5ee0e6c7b7465202e to your computer and use it in GitHub Desktop.
Save sstur/a9204e24b9ffb1a5ee0e6c7b7465202e 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",
"esModuleInterop": true
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment