const { compilerOptions } = require("../tsconfig.json");

module.exports = {
  rootDir: '..',
  transform: {
    '.(ts|tsx)': 'ts-jest',
  },
  globals: {
    'ts-jest': {
      diagnostics: true,
      tsConfig: {
        ...compilerOptions,
        allowJs: true,
      },
    },
  },
  moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
  testURL: 'http://localhost',
  testPathIgnorePatterns: [
    '/node_modules/',
    '/dist/'
  ],
  modulePathIgnorePatterns: ['/dist/'],
  setupFiles: ['<rootDir>/src/config/jest/setup.ts'],
};

const { compilerOptions } = require("../tsconfig.json");

module.exports = {
  rootDir: '..',
  transform: {
    '.(ts|tsx)': 'ts-jest',
  },
  globals: {
    'ts-jest': {
      diagnostics: true,
      tsconfig: {
        ...compilerOptions,
        allowJs: true,
      },
    },
  },
  moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
  testURL: 'http://localhost',
  testPathIgnorePatterns: [
    '/node_modules/',
    '/dist/'
  ],
  modulePathIgnorePatterns: ['/dist/'],
  setupFiles: ['<rootDir>/src/config/jest/setup.ts'],
};

Fix jest warning about tsConfig option capitalization.
Fix jest warning about tsConfig option capitalization.

  ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be
  removed in ts-jest 27, use `tsconfig` instead
