-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
t.doesNotThrow() expected parameters seems to be ignored #553
Labels
Comments
node's assert.doesNotThrow(() => { throw new Error("Foo bar") }, TypeError); // throws
assert.doesNotThrow(() => { throw new Error("Foo bar") }, /baz/); // thros node's docs seem to reinforce this. Thus, i think tape's docs may need to be updated to clarify how it works? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I read the code of the method
t.doesNotThrow()
and I don't understand the purpose of theexpected
parameter.The documentation says :
So, if my understanding is correct, the following tests should not fail :
But the current behavior of
t.doesNotThrow()
is to always fail if the callback throws an exception.Should the method
t.doesNotThrow()
be updated to match the documentation, or is my understanding of the documentation incorrect ?The text was updated successfully, but these errors were encountered: