Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

237
Vistas
Unit test with jest, test tap and map

I have problems testing tap and map with jest, I am using spectator. Does anyone know how I can make it go through this part of the code?

private caseEMPLOYEE_ID($ObservableData: Observable<any>, ctrl: any) {
$ObservableData = this.employeeControllerService.getAllEmployeesUsingGet(ctrl.value ? { 'nameOrId.contains': ctrl.value } : {}).pipe(
  tap((response) => this.checkResultSize(response)),
  map((res: any) =>
    this.mapResultsByKey(
      res.content.map((obj) => ({ ...obj, idName: obj.emplid + ' - ' + obj.name })),
      ctrl
    )
  )
);
return $ObservableData;

}

This is the test

Code test

I have not been able to paste the test code as it gives me a format error.

Thank you very much and best regards.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda