module.exports = {
  testEnvironment: 'jsdom',
  roots: ['<rootDir>/src'],
  testMatch: ['**/*.{spec,test}.{js,jsx}'],
  setupFiles: ['<rootDir>/config/jest/setup.env.js', '<rootDir>/config/jest/setup.js'],
  resetMocks: true,
  transform: {
    '^.+\\.(js|jsx)$': [
      'babel-jest',
      {
        babelrc: false,
        configFile: false,
        presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-react'],
      },
    ],
  },
  transformIgnorePatterns: ['node_modules/(?!mirai)/'],
  moduleNameMapper: {
    '\\.(css|less|scss)$': 'identity-obj-proxy',
    '\\.(png|jpg|jpeg|gif|svg|woff2?|ttf|eot)$': '<rootDir>/config/jest/fileMock.js',
  },
};
