This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
jest.config.ts
47 lines (45 loc) · 1.56 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import type {Config} from '@jest/types';
process.env.TZ = 'Asia/Seoul';
export default async (): Promise<Config.InitialOptions> => {
return {
automock: false,
preset: 'jest-expo',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
},
transformIgnorePatterns: [
// eslint-disable-next-line max-len
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg|dooboo-ui|@dooboo-ui)',
],
modulePaths: ['<rootDir>'],
moduleDirectories: ['node_modules'],
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
moduleFileExtensions: ['js', 'ts', 'tsx', 'svg', 'png', 'json'],
globals: {
'ts-jest': {tsconfig: 'tsconfig.spec.json'},
},
modulePathIgnorePatterns: [
'<rootDir>/build/',
'<rootDir>/node_modules/',
'<rootDir>/.history/',
],
moduleNameMapper: {
'\\.svg': '<rootDir>/__mocks__/svgMock.js',
'.+\\.(css|style|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'babel-jest',
},
setupFiles: [
'<rootDir>/test/utils/jestSetup.ts',
'./node_modules/react-native-gesture-handler/jestSetup.js',
],
cacheDirectory: '.jest/cache',
setupFilesAfterEnv: [
'@testing-library/jest-native/extend-expect',
'./test/utils/setupTest.ts',
],
haste: {
defaultPlatform: 'ios',
platforms: ['android', 'ios', 'native'],
},
coveragePathIgnorePatterns: ['/node_modules/'],
};
};