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

132
Vistas
verifying response for amazon cognito in mocha test fail when checking response.status

Following method is written to get the response back when sending a post request to amazon to authenticate any user before any test happened .

const response= await request(https://cognito-url-in-a-zone.amazonaws.com)
      .post("/")
      .set("X-Amz-Target", "AWSCognitoIdentityProviderService.InitiateAuth")
      .set("Content-Type", "application/x-amz-json-1.1")
      .send(JSON.stringify(requestBody));
      expect(result.status).to.eq(200); 

sometimes test failed when checking result.status

i changed it to verify result.Statuscode and it is passing everytime. My question is what is the differnce between checking status and checking statuscode and which one should be in the test

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