-
-
Notifications
You must be signed in to change notification settings - Fork 306
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.throws(undefined)
passes, and should not
#267
Comments
@dmitrizagidulin |
Ohh I see. Is there a way to pass parameters to that function? (and why does it count undefined as a successful throws() test?) |
t.throws(myFunction.bind(null, 'arg1', 'arg2')) t.throws(function () {
myFunction('arg1', 'arg2')
}) |
@dmitrizagidulin indeed that seems like a bug - |
t.throws(undefined)
passes, and should not
Thanks! :) Appreciate the guidance and the fix. |
np - I'll be releasing a patch version for v1, v2, v3, and v4 shortly that will include this fix. |
see tape-testing/tape#267 * * * This commit was sponsored by Neighbourhoodie You can hire Neighbourhoodie for all your Hoodie / CouchDB / Offline First needs http://go.hood.ie/thehoodiefirm
What am I doing wrong here?
t.throws()
doesn't seem to be working (not failing the test when a function is not throwing any exceptions).Here's a sample test, that passes successfully (instead of failing as expected):
I'm on Node 5.0,
tape
version4.4.0
.The text was updated successfully, but these errors were encountered: