module.exports = {
  preset: 'ts-jest',
  transform: {
    '^.+\\.tsx?$': 'babel-jest',
  },
  coverageProvider: 'v8',
  coverageDirectory: 'coverage',
  collectCoverageFrom: ['**/src/**/*.{ts,tsx}', '!**/src/app.tsx'],
  collectCoverage: true,
  clearMocks: true,
  moduleNameMapper: {
    '\\.(svg|webp)$': '<rootDir>/__mocks__/file-mock',
    '\\.(css|scss)$': '<rootDir>/__mocks__/style-mock',
    'react-i18next': '<rootDir>/__mocks__/react-i18next',
  },
  testEnvironmentOptions: {
    customExportConditions: [''],
  },
  testEnvironment: 'jest-fixed-jsdom',
  testPathIgnorePatterns: ['/node_modules/', '<rootDir>/e2e'],
  setupFilesAfterEnv: ['<rootDir>/jest-preset-it/jest.setup.js', '<rootDir>/__mocks__/brojs-cli-mock.ts', '<rootDir>/__mocks__/lottiefiles-mock.tsx'],
};
