forked from hello-nyxo/nyxo-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
40 lines (39 loc) · 1.1 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
/* eslint-disable @typescript-eslint/no-var-requires */
const { defaults: tsjPreset } = require('ts-jest/presets')
module.exports = {
setupFiles: [
'<rootDir>/jest-setup.js',
'./node_modules/react-native-gesture-handler/jestSetup.js'
],
preset: 'react-native',
verbose: true,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
roots: ['<rootDir>'],
testPathIgnorePatterns: ['./node_modules/'],
transformIgnorePatterns: [
'node_modules/(?!(react-native|@sentry/react-native|react-native-ultimate-config|aws-amplify|aws-amplify-react-native)/)'
],
moduleNameMapper: {
'^@components(.*)$': '<rootDir>/src/components$1',
'^@constants(.*)$': '<rootDir>/src/constants$1',
'^@helpers(.*)$': '<rootDir>/src/helpers$1',
'^@actions(.*)$': '<rootDir>/src/store/actions$1'
},
testEnvironment: 'jsdom',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest'
},
automock: false,
coverageThreshold: {
global: {
branches: 90,
lines: 95
}
},
globals: {
'ts-jest': {
babelConfig: true
}
},
cacheDirectory: '.jest/cache'
}