const { defaults } = require('jest-config');

module.exports = {
   verbose: true,
   preset: 'react-native',
   setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
   moduleFileExtensions: [...defaults.moduleFileExtensions, 'd.ts'],
   moduleNameMapper: {
      '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
         '<rootDir>/tests/__mocks__/fileMock.js',
   },
   testMatch: ['**/__tests__/**/*.native.[jt]s?(x)', '**/?(*.)+(spec|test).native.[jt]s?(x)'],
   transformIgnorePatterns: [
      'node_modules/(?!(react-native' +
         '|react-navigation-tabs' +
         '|react-native-picker-select' +
         '|react-native-splash-screen' +
         '|@react-native-community/picker' +
         '|react-native-screens' +
         '|react-native-reanimated' +
         '|react-native-iphone-x-helper' +
         '|react-native-responsive-fontsize' +
         '|@fortawesome/react-native-fontawesome' +
         ')/)',
   ],
   setupFiles: ['<rootDir>/tests/__setup__/general.ts'],
};
