-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathjest.config.js
More file actions
31 lines (30 loc) · 845 Bytes
/
jest.config.js
File metadata and controls
31 lines (30 loc) · 845 Bytes
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
const {defaults: tsjPreset} = require('ts-jest/presets');
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'react-native',
transform: {
'^.+\\.jsx$': 'babel-jest',
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.spec.json',
},
],
},
testMatch: ['<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
collectCoverageFrom: ['./src/screens/**/*.tsx', './src/store/**/*.ts'],
setupFilesAfterEnv: [
'./jest.setup.ts',
'@testing-library/jest-native/extend-expect',
],
transformIgnorePatterns: [
`node_modules/(?!(${[
'react-native-vector-icons',
'react-native',
'@react-native',
'@react-navigation/elements',
].join('|')})/)`,
],
};