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

103
Vistas
Cypress stuck in promise and times out

Here is a simplified version of what I'm doing:

  it.only("replicate issue", () => {
    cy.wrap(1).then((num) => {
      return new Cypress.Promise((resolve) => {
        expect(num).to.equal(1);
        cy.wrap(num)
          .then(() => {
            // THIS DOES NOT GET LOGGED
            console.info("...well... then...");
            return 2;
          })
          .then(resolve);
      });
    });
    //.then(... I want to do more stuff with the value resolved by the promise)
  });

Everything seems to go well until cy.wrap(num) where the chained .then() method's callback never gets called. I get cy.then() timed out after waiting 4000ms.

How come this happens, and what can I do to make Cypress continue execution?

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