forked from GeekyAnts/NativeBase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
17 lines (16 loc) · 872 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const config = {
projects: [{ preset: 'jest-expo/web' }, { preset: 'jest-expo/node' }],
transformIgnorePatterns: [
'<rootDir>/../node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|@sentry/.*)',
],
setupFilesAfterEnv: ['<rootDir>/__mocks__/globalMock.js'],
globals: {
window: {},
},
moduleNameMapper: {
'^.+\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js', // replaces .css imports with an empty object
'\\.(jpg|png|gif|ttf|eot|svg)$': '<rootDir>/__mocks__/fileMock.js', // replaces file imports with a useless string
'^react($|/.+)': '<rootDir>/node_modules/react$1', // makes sure all React imports are running off of the one in this package.
},
};
module.exports = config;