/**
 * Jest config for the UlHub backend (NestJS).
 * ts-jest transpiles the TypeScript sources; decorators/metadata are honored via tsconfig.
 * Specs live next to sources as *.spec.ts (unit) — e2e would go under test/ with a separate config.
 */
module.exports = {
  moduleFileExtensions: ['js', 'json', 'ts'],
  rootDir: 'src',
  testRegex: '.*\\.spec\\.ts$',
  transform: {
    '^.+\\.ts$': ['ts-jest', { tsconfig: '<rootDir>/../tsconfig.json' }],
  },
  collectCoverageFrom: ['**/*.(t|j)s'],
  coverageDirectory: '../coverage',
  testEnvironment: 'node',
};
