-
Notifications
You must be signed in to change notification settings - Fork 163
Expand file tree
/
Copy pathjest.config.js
More file actions
41 lines (40 loc) · 1.47 KB
/
jest.config.js
File metadata and controls
41 lines (40 loc) · 1.47 KB
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
/*
* @Author: czy0729
* @Date: 2026-05-10 17:22:21
* @Last Modified by: czy0729
* @Last Modified time: 2026-05-10 17:22:21
*/
const path = require('path')
module.exports = {
globals: {
__DEV__: true
},
transform: {
'^.+\\.[jt]sx?$': path.resolve(__dirname, 'jest-transformer.js')
},
transformIgnorePatterns: [
'/node_modules/(?!p-limit|yocto-queue|expo-*)'
],
moduleNameMapper: {
'^@_$': '<rootDir>',
'^@/(.*)$': '<rootDir>/$1',
'^@_/(.*)$': '<rootDir>/src/screens/_/$1',
'^@assets/(.*)$': '<rootDir>/src/assets/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@constants/constants$': '<rootDir>/__mocks__/constants.js',
'^@constants/(.*)$': '<rootDir>/src/constants/$1',
'^@screens/(.*)$': '<rootDir>/src/screens/$1',
'^@stores/(.*)$': '<rootDir>/src/stores/$1',
'^@styles/(.*)$': '<rootDir>/src/styles/$1',
'^@tinygrail/(.*)$': '<rootDir>/src/screens/tinygrail/$1',
'^@types/(.*)$': '<rootDir>/src/types/$1',
'^@utils/(.*)$': '<rootDir>/src/utils/$1',
'^@src/(.*)$': '<rootDir>/src/$1',
'^react-native$': '<rootDir>/__mocks__/react-native.js',
'^expo-web-browser$': '<rootDir>/__mocks__/expo-web-browser.js',
'^expo-modules-core(/.*)?$': '<rootDir>/__mocks__/expo-modules-core.js'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
testPathIgnorePatterns: ['/node_modules/', '/web/', '/test/']
}