2022-04-29 02:44:38 +00:00
|
|
|
module.exports = {
|
|
|
|
moduleFileExtensions: [
|
|
|
|
'web.js',
|
|
|
|
'ios.js',
|
|
|
|
'mobile.js',
|
|
|
|
'mjs',
|
|
|
|
'js',
|
2022-05-07 12:33:17 +00:00
|
|
|
'ts',
|
2022-04-29 02:44:38 +00:00
|
|
|
'json'
|
|
|
|
],
|
|
|
|
moduleDirectories: ['<rootDir>/node_modules', 'node_modules'],
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
setupFilesAfterEnv: ['<rootDir>/src/setupTests.js'],
|
|
|
|
testMatch: ['<rootDir>/src/components/mobile/**/*.test.js'],
|
|
|
|
testPathIgnorePatterns: [
|
|
|
|
'/node_modules/(?!loot-core).+\\.js$'
|
|
|
|
],
|
|
|
|
moduleNameMapper: {
|
|
|
|
'^react-native$': 'react-native-web',
|
|
|
|
// Ignore react-art. react-native-web tries to pull it in but we
|
|
|
|
// never use or need it, and it throws errors in jsdom
|
|
|
|
'^react-art$': 'identity-obj-proxy',
|
|
|
|
'^react-native-gesture-handler$': '<rootDir>/src/guide/mocks/react-native-gesture-handler.js',
|
|
|
|
'^react-native-reanimated$': '<rootDir>/src/guide/mocks/react-native-reanimated.js'
|
|
|
|
},
|
|
|
|
globals: {
|
|
|
|
IS_REACT_NATIVE: true
|
|
|
|
}
|
|
|
|
};
|