-
-
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
fixes for strict mode #1232
fixes for strict mode #1232
Conversation
@@ -196,6 +196,7 @@ mocha.ui(program.ui); | |||
|
|||
// load reporter | |||
|
|||
var Reporter; | |||
try { | |||
Reporter = require('../lib/reporters/' + program.reporter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@csantero rather than confining Reporter
to the module scope, it seems you should try removing the var Reporter;
statement and adding global.Reporter = require....
instead.
needs to be documented here: https://github.com/visionmedia/mocha/blob/master/bin/_mocha#L61..L95 thanks |
@travisjeffery Updated. Sorry about the delay. |
ah now that i'm trying this, i'm noticing all the code that would have to change - since nested functions would need be declared at the top of their containing function. that goes against our coding style so i don't think this gonna make it. it's a better practice to use |
Is this still the case? |
A couple fixes to allow running with --harmony and --use-strict