forked from XRPL-Labs/Xaman-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
32 lines (31 loc) · 1.09 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
const { defaults: tsJestConfig } = require('ts-jest/presets');
module.exports = {
...tsJestConfig,
preset: 'react-native',
timers: 'fake',
transformIgnorePatterns: [
'node_modules/(?!react-native|@react-native|@react-native-community|realm|@react-native-firebase)',
],
setupFiles: ['./jest.setup.js'],
collectCoverage: true,
coverageReporters: ['lcov'],
globals: {
window: {},
'ts-jest': {
babelConfig: false,
isolatedModules: true,
tsconfig: 'tsconfig.jest.json',
},
},
transform: {
'^.+\\.(js|jsx)$': '<rootDir>/node_modules/babel-jest',
'\\.(ts|tsx)$': 'ts-jest',
},
testMatch: ['**/__tests__/**/?(*.)+(spec|test).(js|ts|tsx)'],
testPathIgnorePatterns: ['\\.snap$', '<rootDir>/node_modules/', '<rootDir>/e2e/'],
cacheDirectory: '.jest/cache',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'ios.ts', 'ios.tsx', 'android.ts', 'android.tsx'],
setupFilesAfterEnv: ['<rootDir>/src/__mocks__/globalMock.ts'],
maxWorkers: 1,
testTimeout: 20000,
};