- Add jest.config.js for testing - Update figura-transporte DTO - Update services index exports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
717 B
JavaScript
31 lines
717 B
JavaScript
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
roots: ['<rootDir>/src'],
|
|
testMatch: [
|
|
'**/__tests__/**/*.+(ts|tsx|js)',
|
|
'**/?(*.)+(spec|test).+(ts|tsx|js)'
|
|
],
|
|
transform: {
|
|
'^.+\\.(ts|tsx)$': ['ts-jest', {
|
|
useESM: false,
|
|
tsconfig: 'tsconfig.json',
|
|
}],
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
},
|
|
collectCoverageFrom: [
|
|
'src/**/*.{ts,tsx}',
|
|
'!src/**/*.d.ts',
|
|
'!src/**/__tests__/**',
|
|
],
|
|
coverageDirectory: 'coverage',
|
|
verbose: true,
|
|
testTimeout: 30000,
|
|
clearMocks: true,
|
|
restoreMocks: true,
|
|
};
|