back-projet-bUT3/jest.config.ts

29 lines
764 B
TypeScript
Raw Permalink Normal View History

2024-01-28 14:31:51 +01:00
import type { Config } from 'jest'
const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: {
'@helpers': '<rootDir>/src/helpers',
'@constants': '<rootDir>/src/constants',
'@controllers': '<rootDir>/src/controllers',
'@models': '<rootDir>/src/models',
'@routes': '<rootDir>/src/routes',
'@types': '<rootDir>/src/types',
},
testTimeout: 10000,
coverageDirectory: 'coverage',
coverageReporters: ['json-summary', 'text'],
coveragePathIgnorePatterns: [
'<rootDir>/src/types/',
'<rootDir>/src/models/',
'<rootDir>/src/index.ts',
'databaseConnection.ts',
'getCorsOptions.ts',
'test.config.ts',
],
}
export default config