node-api-template/jest.config.js
2024-07-03 14:52:30 -04:00

21 lines
700 B
JavaScript

module.exports = {
roots: ['<rootDir>/src'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'node',
preset: 'ts-jest',
moduleNameMapper: {
'^@src/(.*)$': '<rootDir>/src/$1',
'^@controllers/(.*)$': '<rootDir>/src/controllers/$1',
'^@models/(.*)$': '<rootDir>/src/models/$1',
'^@services/(.*)$': '<rootDir>/src/services/$1',
'^@utils/(.*)$': '<rootDir>/src/utils/$1',
'^@libs/(.*)$': '<rootDir>/src/libs/$1',
'^@configs/(.*)$': '<rootDir>/configs/$1',
'^@middlewares/(.*)$': '<rootDir>/src/middlewares/$1',
},
};