-
Notifications
You must be signed in to change notification settings - Fork 108
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
eventually implies fulfilled #223
Comments
@hsablonniere In the case of In the case of I think it's an interesting idea for |
Just a small note: In your tests you're using pre-fulfilled/rejected promises, but when using pending promises, I think it is correct that The first one allows the promise to be pending, as long as it becomes fulfilled before the test timeouts. The second one does not, it checks immediately if the promise is fulfilled. The test that should be equivalent to EDIT: or maybe it should be |
Hey chai-as-promised team 😄
The setup
The situation
Basically, I'm wondering why using
expect().to.eventually.equal()
andexpect().to.be.fulfilled.and.eventually.equal()
behave differently.Here's my reduced test case:
The first two tests pass as expected.
The third test gives me the TypeError with a stack trace to the line where the TypeError was thrown (inside the tested function).
The fourth test warns me about a failed assertion which is the behaviour I'm waiting for.
My questions
eventually.equals
implied a fulfilled promise.It it's something that should be fixed, I can try to work on a PR but I may need a few hints.
Thanks for you help 😉
The text was updated successfully, but these errors were encountered: