-
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
Working with asynchronously rejected promises. #24
Comments
Wow, that is definitely supposed to work, and I'm embarrassed the test cases don't include such tests. Thanks for catching it. I'll be spending more time on this package in the near future (i.e. during the upcoming week), and will be sure to get this straightened out then. |
Any headway on this? |
I have a rewrite halfway done, I will push it to a branch tonight and if I have time do some work on it. Thanks as always for the prompt; more people getting hit by something does push it up higher in my priority queue. |
Rewrite branch pushed so you guys can see some progress at least https://github.com/domenic/chai-as-promised/tree/rewrite but no time to work on it tonight, I think I'm starting to feel sick :-/. This weekend!! I keep saying that, but really, I should be able to make it work this time!!! |
awesome, thanks |
I'm having trouble using this library on promises that are resolved asynchronously.
I assumed I could write something like this:
(where
getPendingPromise()
is a function that returns a promise that will resolve in a few milliseconds)In the code above, my promise is being resolved in the background, and I assumed this library would wait for resolution before making its assertion.
But what actually happens is it times out and
done
is never called.If I change the code to add a timeout, then the test passes:
So I wonder if this library can only work with resolved promises? All the internal tests seem to be articulated with already-resolved promises (the
fulfilledPromise()
andrejectedPromise()
factories generate them).Any clarification would be appreciated.
The text was updated successfully, but these errors were encountered: