Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

78
Vistas
Pass test on timeout in Cucumber JS

I'm working on some basic BDD tests in which I want to cover one specific case. Shortly, I need to write test which is not failing on timeout, cause in this scenario, this is normal behaviour, that something is blocked and in next step I want to use mechanism that will unblock it. Normally, step definition with timeout can look like this:

When("get PID fails", { timeout: 50000 }, async function(this: World) {
// code here
});

This function will fail after 50000ms right? Is it possible to reverse logic here? I want that this test passed if timeout occured (cause in my logic, timeout is appropriate behaviour). How can I achieve that?

7 months 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 empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.