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?