forked from XRPL-Labs/Xaman-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
26 lines (25 loc) · 976 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
const { defaults: tsJestConfig } = require('ts-jest/presets');
module.exports = {
...tsJestConfig,
preset: 'react-native',
timers: 'fake',
transformIgnorePatterns: ['node_modules/(?!react-native|@react-native-community|realm|@react-native-firebase)'],
setupFiles: ['./jest.setup.js'],
collectCoverage: true,
globals: {
window: {},
'ts-jest': {
babelConfig: false,
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'],
};