You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this just needs a PR to update the docs, but I am making an issue in case this is a bug with how isRejected function.
On line 86 of the README it has an example for the assert interface: return assert.isRejected(promise, "optional message");
However, I don't think the string ever gets treated as a message, and instead as an error message matcher.
From what I can see if you called assert.isRejected(promise, msg) it would call L321 and pass along your message as the errorLike. isRejected calls rejectedWith. Looking at Line 153 of the library the original msg string would now be set to the errMsgMatcher. Which is not the intended behaviour as per the docs.
I think the solution is just update the docs, right? Or should you have the ability to just set a message on its own?
The text was updated successfully, but these errors were encountered:
I think this just needs a PR to update the docs, but I am making an issue in case this is a bug with how
isRejected
function.On line 86 of the README it has an example for the assert interface:
return assert.isRejected(promise, "optional message");
However, I don't think the string ever gets treated as a message, and instead as an error message matcher.
From what I can see if you called
assert.isRejected(promise, msg)
it would call L321 and pass along your message as theerrorLike
.isRejected
callsrejectedWith
. Looking at Line 153 of the library the originalmsg
string would now be set to theerrMsgMatcher
. Which is not the intended behaviour as per the docs.I think the solution is just update the docs, right? Or should you have the ability to just set a message on its own?
The text was updated successfully, but these errors were encountered: