-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Mocha.run throws a TypeError if callback is not provided #1496
Labels
type: bug
a defect, confirmed by a maintainer
Comments
Same issue here, the workaround solved it for now. |
@dasilvacontin As @julien-f experienced the same issue, you may want to change the label, unconfirmed, to something like invalid or bug? |
Sure, thanks for the heads up, @flowersinthesand! |
dasilvacontin
added
type: bug
a defect, confirmed by a maintainer
status: accepting prs
Mocha can use your help with this one!
and removed
Unconfirmed
labels
Jan 28, 2015
PR #1520 fixes this issue. |
travisjeffery
pushed a commit
that referenced
this issue
Feb 3, 2015
In .run(fn), check if fn exists before executing the callback, fixes #1496
Will there be a release with this in it? |
boneskull
removed
the
status: accepting prs
Mocha can use your help with this one!
label
Oct 10, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce the issue, install Mocha 2.1.0 and run this script on Node console.
Here is
test.js
Then, I get:
2.0.1 works fine. As the wiki page shows use of
mocha.run()
, I think it's a regression in 2.1.0. A workaround is to pass an empty callback.It looks like that 30582e6 is the cause. Before executing
fn(failures);
, it should check iffn
is available.The text was updated successfully, but these errors were encountered: