You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the library ignores the fact that async callbacks may take time. This means waitForExpect does not timeout when it should.
Context
This library is used by pptr-testing-library, where callbacks need to interface with puppeteer, which can take time.
We are setting the waitForExpect timeout to 2000ms, yet it is the test itself that timeouts after 5000ms (rather than the waitForExpect timeout). We are asserting on non-existence (problematic alright, but we must at the moment), so need waitFor to timeout correctly.
Log
Below the setting given to waitForExpect and a millisecond log on each retry. You'll see that we are past 2000 at retry 17, although 40 are queued.
Currently, the library ignores the fact that async callbacks may take time. This means
waitForExpect
does not timeout when it should.Context
This library is used by pptr-testing-library, where callbacks need to interface with puppeteer, which can take time.
We are setting the
waitForExpect
timeout to 2000ms, yet it is the test itself that timeouts after 5000ms (rather than thewaitForExpect
timeout). We are asserting on non-existence (problematic alright, but we must at the moment), so needwaitFor
to timeout correctly.Log
Below the setting given to
waitForExpect
and a millisecond log on each retry. You'll see that we are past 2000 at retry 17, although 40 are queued.Propose solution
The library should assert on time elapsed, rather than retries. We have modified the code to do just that here. Note, however:
waitFor
function returns a value.The text was updated successfully, but these errors were encountered: