Created
September 5, 2018 11:02
-
-
Save rochapablo/feab6ef190b2176cdd63f274aea2f5e4 to your computer and use it in GitHub Desktop.
jest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
globals: { | |
'ts-jest': { | |
tsConfigFile: 'tsconfig.json' | |
} | |
}, | |
moduleFileExtensions: [ | |
'ts', | |
'js' | |
], | |
transform: { | |
'^.+\\.(ts|tsx)$': './node_modules/ts-jest/preprocessor.js' | |
}, | |
testMatch: [ | |
'**/test/**/*.test.(ts|js)' | |
], | |
testEnvironment: 'node', | |
setupFiles: [ | |
// "<rootDir>/test/setup.js" | |
], | |
setupTestFrameworkScriptFile: '<rootDir>/test/setup.ts' | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"jest": { | |
"preset": "react-native", | |
"setupFiles": [ | |
"<rootDir>/tests/setup.js" | |
], | |
"transform": { | |
"^.+\\.(js|jsx)?$": "<rootDir>/node_modules/babel-jest", | |
"^.+\\.(ts|tsx)?$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | |
}, | |
"testRegex": "/tests/src/.*.spec.(js|tsx|ts)?$", | |
"transformIgnorePatterns": [ | |
"/node_modules/(?!native-base)/" | |
], | |
"moduleFileExtensions": [ | |
"ts", | |
"tsx", | |
"js", | |
"jsx", | |
"json" | |
], | |
"moduleNameMapper": { | |
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "identity-obj-proxy" | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment