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
This might be better served by a try/catch wrapper, or something like tryit, but wanted to get feedback.
The assume.wait function is supposed to make it much similar to handle async tests. However, it's still a bit annoy to remember to capture errors to be able to pass them to next. For example:
If asynctaskfail actually did return an err, one might expect done to be called with the assertion error. Instead nothing happens, and most harnesses will time out after 2 seconds, giving the user the harness's timeout error instead.
To handle this correctly, I must write something similar to the following:
This isn't much different than the code I had to write before assume.wait, so I'm not sure what benefit it brings to the table in the current iteration.
While reading the documentation and glancing at the example, I expected the assertion functions to immediately call done on error, instead of throwing an exception.
The text was updated successfully, but these errors were encountered:
This might be better served by a try/catch wrapper, or something like
tryit
, but wanted to get feedback.The
assume.wait
function is supposed to make it much similar to handle async tests. However, it's still a bit annoy to remember to capture errors to be able to pass them to next. For example:If
asynctaskfail
actually did return anerr
, one might expectdone
to be called with the assertion error. Instead nothing happens, and most harnesses will time out after 2 seconds, giving the user the harness's timeout error instead.To handle this correctly, I must write something similar to the following:
This isn't much different than the code I had to write before
assume.wait
, so I'm not sure what benefit it brings to the table in the current iteration.While reading the documentation and glancing at the example, I expected the assertion functions to immediately call
done
on error, instead of throwing an exception.The text was updated successfully, but these errors were encountered: