-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
29 lines (27 loc) · 979 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 { defaults as tsjPreset } from 'ts-jest/presets';
import type { JestConfigWithTsJest } from 'ts-jest';
const jestConfig: JestConfigWithTsJest = {
...tsjPreset,
preset: 'ts-jest',
transform: {
'^.+\\.jsx$': 'babel-jest',
'^.+\\.tsx$': [
'ts-jest',
{
tsconfig: 'tsconfig.spec.json',
},
],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
transformIgnorePatterns: [
'node_modules/(?!(@react-native|react-native|react-native-code-push|@react-navigation|uuid|react-native-config|react-native-version-check|react-native-fs|react-native-reanimated|@zerogachis/smartway-react-native-ui|react-native-gesture-handler)/)',
],
setupFilesAfterEnv: [
'<rootDir>/__tests__/jest-setup.ts',
],
moduleNameMapper: {
'^app/(.*)$': '<rootDir>/src/$1',
},
testMatch: ['**/?(*.)test.(ts|tsx)'],
};
export default jestConfig;