forked from Expensify/react-native-onyx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
22 lines (22 loc) · 857 Bytes
/
jest.config.js
File metadata and controls
22 lines (22 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module.exports = {
preset: 'react-native',
roots: ['<rootDir>/lib', '<rootDir>/tests'],
transform: {
'\\.[jt]sx?$': 'babel-jest',
},
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/tests/unit/mocks/', '<rootDir>/tests/e2e/', '<rootDir>/tests/types/'],
testMatch: ['**/tests/unit/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
globals: {
__DEV__: true,
WebSocket: {},
},
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['./jestSetup.js'],
testTimeout: 60000,
transformIgnorePatterns: ['node_modules/(?!((@)?react-native|@ngneat/falso|uuid)/)'],
testSequencer: './jest-sequencer.js',
moduleNameMapper: {
// Redirect all imports of OnyxMerge to its web version during unit tests.
'^(.*)/OnyxMerge$': '<rootDir>/lib/OnyxMerge/index.ts',
},
};