forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (31 loc) · 1.16 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
const testFileExtension = '[jt]s?(x)';
module.exports = {
preset: 'jest-expo',
testMatch: [
`<rootDir>/tests/ui/**/*.${testFileExtension}`,
`<rootDir>/tests/unit/**/*.${testFileExtension}`,
`<rootDir>/tests/actions/**/*.${testFileExtension}`,
`<rootDir>/?(*.)+(spec|test).${testFileExtension}`,
],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.svg?$': 'jest-transformer-svg',
},
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', './node_modules/@react-native-google-signin/google-signin/jest/build/setup.js'],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect', '<rootDir>/jest/setupAfterEnv.js', '<rootDir>/tests/perf-test/setupAfterEnv.js'],
cacheDirectory: '<rootDir>/.jest-cache',
moduleNameMapper: {
'\\.(lottie)$': '<rootDir>/__mocks__/fileMock.js',
},
};