-
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
Assertion does not fail if promise is rejected without reason #56
Comments
Darn, I thought I fixed this. While of course it is a bug in your code if you reject with a non- |
My mistake, the bug seems to be in Mochas testrunner. This yields the same result (without involvement of chai or chai-as-promised).:
Closing this issue. |
Hmm right, yeah I think it is because Mocha bottoms out at the it('should fail if called with an error that is undefined', function (done) {
done(undefined);
}); counts as a success. In theory they should handle this better for promises. That said, Chai as Promised should be able to handle this, as Chai as Promised doesn't communicate the original rejection directly to Mocha. Reopening for future fix. |
I'm rolling up all bugs in the category "isRejected/rejectedWith doesn't behave like Chai's error rejectors" into #166. |
In the following code, the two test cases should fail. However, they pass.
The text was updated successfully, but these errors were encountered: