-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
jest.config.ts
29 lines (27 loc) · 863 Bytes
/
jest.config.ts
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
import {JestConfigWithTsJest} from 'ts-jest';
const jestConfig: JestConfigWithTsJest = {
preset: 'react-native',
extensionsToTreatAsEsm: ['.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
verbose: true,
transform: {
'^.+\\.jsx$': 'babel-jest',
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
},
],
},
transformIgnorePatterns: [
'node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation|@rneui|react-native-localize)',
],
testPathIgnorePatterns: ['<rootDir>/__tests__/__helpers__'],
setupFiles: [
'./node_modules/react-native/jest/setup.js',
'./node_modules/react-native-gesture-handler/jestSetup.js',
'./jest.setup.ts',
],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
};
export default jestConfig;