Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 679 Bytes

File metadata and controls

25 lines (16 loc) · 679 Bytes

Crear tests unitarios

Objetivo

Crear una suite de tests unitarios para el backend

Contexto

  • README.md

Instrucciones

  • Escribe tests jest en backend/src/tests/tests-iniciales.test.ts para:

    • backend\src\application\services\candidateService.ts
    • backend\src\application\services\fileUploadService.ts
  • Ejecútalos con npm test y corrige cualquier fallo.

  • Hay 2 familias principales de tests:

    1. Recepción de los datos del formulario
    2. Guardado en la base de datos Se deben cubrir ambas.

Preguntas posteriores

  • ¿Qué otros casos límite se te ocurren que puedan fallar para candidateService.addCandidate y para fileUploadService.uploadFile ?