[SYNC] chore: Add jest config and update carta-porte services
- Add jest.config.js for testing - Update figura-transporte DTO - Update services index exports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
825e349f37
commit
e6c4d6b847
30
jest.config.js
Normal file
30
jest.config.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/** @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,
|
||||||
|
};
|
||||||
@ -9,7 +9,7 @@ import {
|
|||||||
Matches,
|
Matches,
|
||||||
} from 'class-validator';
|
} from 'class-validator';
|
||||||
import { Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
import { TipoFiguraTransporte } from '../entities';
|
import { TipoFigura } from '../entities';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DTO para partes de transporte (propietario/arrendador)
|
* DTO para partes de transporte (propietario/arrendador)
|
||||||
@ -76,15 +76,15 @@ export class DomicilioFiguraDto {
|
|||||||
*/
|
*/
|
||||||
export class CreateFiguraTransporteDto {
|
export class CreateFiguraTransporteDto {
|
||||||
/**
|
/**
|
||||||
* Tipo de figura de transporte (catalogo c_TipoFiguraTransporte)
|
* Tipo de figura de transporte (catalogo c_TipoFigura)
|
||||||
* 01 = Operador
|
* 01 = Operador
|
||||||
* 02 = Propietario
|
* 02 = Propietario
|
||||||
* 03 = Arrendador
|
* 03 = Arrendador
|
||||||
* 04 = Notificado
|
* 04 = Notificado
|
||||||
*/
|
*/
|
||||||
@IsEnum(TipoFiguraTransporte, { message: 'tipoFigura debe ser 01, 02, 03 o 04' })
|
@IsEnum(TipoFigura, { message: 'tipoFigura debe ser 01, 02, 03 o 04' })
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
tipoFigura!: TipoFiguraTransporte;
|
tipoFigura!: TipoFigura;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RFC de la figura (opcional para operadores extranjeros)
|
* RFC de la figura (opcional para operadores extranjeros)
|
||||||
|
|||||||
@ -18,7 +18,5 @@ export * from './figura-transporte.service';
|
|||||||
// Inspeccion Pre-Viaje (Pre-trip Inspection) Service
|
// Inspeccion Pre-Viaje (Pre-trip Inspection) Service
|
||||||
export * from './inspeccion-pre-viaje.service';
|
export * from './inspeccion-pre-viaje.service';
|
||||||
|
|
||||||
// TODO: Implement additional services
|
// XML Generator Service (CFDI + Carta Porte 3.1)
|
||||||
// - carta-porte-validator.service.ts (validacion SAT detallada)
|
export * from './carta-porte-xml.service';
|
||||||
// - pac-integration.service.ts (integracion con PAC)
|
|
||||||
// - cfdi-generator.service.ts (generacion XML CFDI)
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user