2022-04-29 02:44:38 +00:00
|
|
|
const isReactNative = process.env.REACT_APP_IS_REACT_NATIVE;
|
|
|
|
|
|
|
|
module.exports = {
|
2022-08-24 20:13:04 +00:00
|
|
|
preset: 'ts-jest/presets/js-with-ts-esm',
|
2022-04-29 02:44:38 +00:00
|
|
|
moduleFileExtensions: ['testing.js', 'electron.js']
|
|
|
|
.concat(isReactNative ? ['ios.js', 'mobile.js'] : [])
|
2022-05-07 12:33:17 +00:00
|
|
|
.concat(['mjs', 'js', 'ts', 'json']),
|
2022-04-29 02:44:38 +00:00
|
|
|
setupFilesAfterEnv: ['<rootDir>/src/mocks/setup.js'],
|
|
|
|
testEnvironment: 'node',
|
2022-08-24 20:13:37 +00:00
|
|
|
testPathIgnorePatterns: ['/node_modules/', '/lib/', '.+/index.web.test.js'],
|
2022-08-24 20:15:00 +00:00
|
|
|
transformIgnorePatterns: ['/node_modules/', '__mocks__'],
|
2022-04-29 02:44:38 +00:00
|
|
|
globals: {
|
|
|
|
__TESTING__: true
|
|
|
|
}
|
|
|
|
};
|