Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!