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

196
Views
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?

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!