should.beRejected() should accept an expected error |
|
Issue descriptionCurrently should.beRejected() doesn't take any argument. As long as the promise is rejected, the test passes. However, it would be beneficial if beRejected() took an argument specifying the expected error type, just like we do for should.throw().
,
Mar 16 2018
Not sure what needs to be done here. Can you clarify?
,
Mar 19 2018
I think it should be consistent. beRejected() should take an arg like throw() does. Or make throw() not take an arg and add throwWith() that does, to match beRejectedWith(). I have a slight preference for beRejected() taking an optional arg, like throw(). This is less than P3. |
|
►
Sign in to add a comment |
|
Comment 1 by rtoy@chromium.org
, Mar 16 2017