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
I need to test a promise that should be in a pending state at the moment of the test. I was able to test it doing:
expect(promise).to.eventually.not.be.fulfilled
this expect throws the expected error but it isnt bound to the mochas context so if it fails it won't be reported as a failed test. If I return it or await, the statement will block for 2s and mocha will fail with a timeout, because mocha expects promises to either be resolved or rejected.
Is there any plans to implement something like expect(promise).to.eventually.be.pending?
The text was updated successfully, but these errors were encountered:
I need to test a promise that should be in a pending state at the moment of the test. I was able to test it doing:
expect(promise).to.eventually.not.be.fulfilled
this expect throws the expected error but it isnt bound to the mochas context so if it fails it won't be reported as a failed test. If I
return
it orawait
, the statement will block for 2s and mocha will fail with a timeout, because mocha expects promises to either be resolved or rejected.Is there any plans to implement something like
expect(promise).to.eventually.be.pending
?The text was updated successfully, but these errors were encountered: