-
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
Returning the result of .should.be.rejected
leads to output on stderr.
#97
Comments
This is a Bluebird bug/"feature", your tests are fine, but they have strange policies that result in garbage on stderr when promises are being used in ways the author of Bluebird did not anticipate. |
Thanks for the info. |
Any recommendations on how to prevent this with Bluebird? |
@adambiggs I gave up on it so I can only recommend "don't use chai-as-promised" |
That advice could just as easily be "don't use bluebird" 😉 |
After relying on all that cool stuff like |
It supports it just fine. Bluebird has some bugs that cause random shit to be spewed onto the console. That's a bug, but not a fatal one (your tests will still pass or fail appropriately), and it's not Chai as Promised's job to fix it. |
I'm pretty sceptical of your assertion there, where's the link to the bluebird bug? How come the thousands of projects that use bluebird haven't come across the same thing? |
It's not my responsibility to file a bug on a library I'm not using. This is a pretty commonly encountered issue with Bluebird; see e.g. http://lmgtfy.com/?q=bluebird+%22Unhandled+rejection%22 Anyway this is pretty clearly turning into something combative and non-productive, and there's no Chai as Promised issue here, so I'm locking this thread. |
Just FYI @ohjames - this isn't Chai As Promised's bug - because the rejected property handles the rejection (right about here), so Bluebird saying this is an unhandled rejection is false. It has been handled, very explicitly. Also, I've filed petkaantonov/bluebird#695 on your behalf. Hopefully you don't mind - and hopefully this can lead to bluebird fixing the issue on their side. Lastly I'd also kindly ask you refrain from second guessing the maintainers of open source projects without concrete proof otherwise - not only is it not productive to solving the issue, but the maintainers are very busy, and unless they have masochistic tendencies like I do, cannot spend their time dealing with every comment. I know you can't reply here, but if you feel the need to discuss this further you can reach me on twitter @keithamus. |
I would have thought this mocha test would work fine:
It looks like it passes but check out the stderr after the test...
Or am I doing something stupid?
The text was updated successfully, but these errors were encountered: