forked from rainbow-me/rainbow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
24 lines (23 loc) · 849 Bytes
/
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
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');
module.exports = {
preset: 'react-native',
setupFiles: ['./config/test/jest-setup.js'],
testPathIgnorePatterns: ['node_modules', 'e2e'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.jest.json',
},
},
transform: {
// https://kulshekhar.github.io/ts-jest/docs/28.0/guides/react-native
'\\.tsx?$': 'ts-jest',
},
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|react-native-keyboard-area|@rainbow-me/react-native-payments|imgix-core-js|react-native-payments|@react-native-firebase|@react-native(-community)?)/)',
],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>',
}),
};