forked from rainbow-me/rainbow
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
27 lines (26 loc) · 950 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
25
26
27
/** @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'],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))(?<!\\.disabled)\\.[jt]sx?$',
testPathIgnorePatterns: ['node_modules', 'e2e'],
transform: {
'\\.tsx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.jest.json',
},
],
},
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|react-native-keyboard-area|imgix-core-js|react-native-payments|@react-native-firebase|@react-native(-community)?|react-native-reanimated|react-native-linear-gradient)/)',
],
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>',
}),
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
};