Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of to.eventually.be.pending #265

Open
dhulke opened this issue Jun 24, 2020 · 0 comments
Open

Implementation of to.eventually.be.pending #265

dhulke opened this issue Jun 24, 2020 · 0 comments

Comments

@dhulke
Copy link

dhulke commented Jun 24, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant