module.exports = {
  preset: 'ts-jest',
  testEnvironment: 'node',
  roots: ['<rootDir>/src'],
  testMatch: ['**/__tests__/**/*.test.ts'],
  transform: {
    '^.+\\.tsx?$': ['ts-jest', {
      diagnostics: false,
      tsconfig: {
        target: 'es2017',
        module: 'commonjs',
        moduleResolution: 'node',
        esModuleInterop: true,
        allowJs: true,
        strict: false,
        noImplicitAny: false,
        skipLibCheck: true,
        lib: ['es2017', 'esnext'],
      }
    }]
  },
  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
  moduleNameMapper: {
    '^axios$': '<rootDir>/src/methods/__tests__/__mocks__/empty.ts',
    '^dayjs$': '<rootDir>/src/methods/__tests__/__mocks__/empty.ts',
    '^moleculer-cron$': '<rootDir>/src/methods/__tests__/__mocks__/empty.ts',
  },
};
