-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
jest.config.js
36 lines (36 loc) · 1.04 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
33
34
35
36
const testFileExtension = '[jt]s?(x)';
module.exports = {
// TODO: change this back to preset: 'react-native' once we upgrade to React Native >= 0.71.2
preset: '@testing-library/react-native',
testMatch: [
`<rootDir>/tests/ui/**/*.${testFileExtension}`,
`<rootDir>/tests/unit/**/*.${testFileExtension}`,
`<rootDir>/tests/actions/**/*.${testFileExtension}`,
`<rootDir>/?(*.)+(spec|test).${testFileExtension}`,
],
transform: {
'^.+\\.jsx?$': 'babel-jest',
},
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!react-native)/',
],
testPathIgnorePatterns: [
'<rootDir>/node_modules',
],
globals: {
__DEV__: true,
WebSocket: {},
},
fakeTimers: {
enableGlobally: true,
doNotFake: ['nextTick'],
},
testEnvironment: 'jsdom',
setupFiles: [
'<rootDir>/jest/setup.js',
],
setupFilesAfterEnv: [
'@testing-library/jest-native/extend-expect',
],
cacheDirectory: '<rootDir>/.jest-cache',
};