forked from sap-labs-france/ev-mobile
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
27 lines (27 loc) · 963 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module.exports = {
preset: 'react-native',
reporters: [ "default", "jest-junit" ],
testResultsProcessor: "jest-junit",
globals: {
'ts-jest': {
// Tell ts-jest about our typescript config.
tsconfig: 'tsconfig.spec.json'
},
},
// Transforms tell jest how to process our non-javascript files.
// Here we're using babel for .js and .jsx files, and ts-jest for
// .ts and .tsx files. You *can* just use babel-jest for both, if
// you already have babel set up to compile typescript files.
transform: {
"^.+\\.jsx?$": "babel-jest",
"^.+\\.js?$": "babel-jest",
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.ts?$': 'ts-jest'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
// Tells Jest what folders to ignore for tests
testPathIgnorePatterns: [`node_modules`, `\\.cache`],
transformIgnorePatterns: [
'node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation)',
]
}