forked from obytes/react-native-template-obytes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
43 lines (43 loc) · 1.27 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
41
42
43
module.exports = {
preset: 'jest-expo',
setupFilesAfterEnv: [
'@testing-library/jest-native/extend-expect',
'<rootDir>/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-expo|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',
},
};