-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
47 lines (47 loc) · 1.29 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
44
45
46
47
module.exports = {
preset: 'jest-expo',
setupFilesAfterEnv: [
'@testing-library/react-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' }],
'lcov',
],
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',
},
};