const {compilerOptions} = require('../tsconfig.json');
const {pathsToModuleNameMapper} = require('ts-jest/utils');

module.exports = {
  displayName: 'auth',
  preset: 'ts-jest/presets/js-with-babel',
  rootDir: './../',
  moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
    prefix: '<rootDir>/..',
  }),
  testEnvironment: 'node',
  testMatch: ['<rootDir>/routes/api/auth.test.ts'],
  setupFilesAfterEnv: ['<rootDir>/.jest/auth.setup.js'],
  globals: {
    'ts-jest': {
      isolatedModules: true,
    },
  },
};
