-
Notifications
You must be signed in to change notification settings - Fork 379
/
jest.config.js
40 lines (40 loc) · 1.21 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
module.exports = {
preset: 'jest-expo',
setupFilesAfterEnv: ['<rootDir>/jest-setup.ts'],
testMatch: ['**/?(*.)+(spec|test).ts?(x)'],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!**/coverage/**',
'!**/node_modules/**',
'!**/babel.config.js',
'!**/jest.setup.js',
'!**/docs/**',
'!**/cli/**',
],
moduleFileExtensions: ['js', 'ts', 'tsx'],
transformIgnorePatterns: [
`node_modules/(?!(?:.pnpm/)?((jest-)?react-native|@react-native(-community)?|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|@sentry/.*|native-base|react-native-svg))`,
],
coverageReporters: ['json-summary', ['text', { file: 'coverage.txt' }]],
reporters: [
'default',
['github-actions', { silent: false }],
'summary',
[
'jest-junit',
{
outputDirectory: 'coverage',
outputName: 'jest-junit.xml',
ancestorSeparator: ' › ',
uniqueOutputName: 'false',
suiteNameTemplate: '{filepath}',
classNameTemplate: '{classname}',
titleTemplate: '{title}',
},
],
],
coverageDirectory: '<rootDir>/coverage/',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
};