-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Description
I'm not using Bluebird but similarly to this thread I'm getting the same warning errors of unhanded rejection when actually expecting a rejection.
Here's a repo to reproduce: https://github.com/laggingreflex/chai-as-promised-reject-test
It was mentioned chai-as-promised is indeed handling the errors (here) but I think they're not being handled soon enough. Putting a console.log there shows that it reaches that code only after the warning has been displayed:
(node:5580) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: rejected
promise
(node:5580) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
>>> assertIfNegated about to be called... <<<
√ should be rejected
1 passing (48ms)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels