-
-
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
support for strict mode #1999
support for strict mode #1999
Conversation
Could you add it to https://github.com/mochajs/mocha/blob/master/bin/_mocha#L58 Without that, it's not usable via mocha.opts |
done, and i rebased as well. |
this needs a minor or major release. I realize now my |
Minor makes sense, but this change wouldn't force a major, right? |
Nope just an pption |
Thanks again! |
Some code in leeching:s-cms leeching$ npm tst
> s-cms@0.0.1 test /Users/leeching/coding.net/s-cms
> mocha --harmony --harmony-destructuring --use_strict test
/Users/leeching/coding.net/s-cms/node_modules/mkdirp/index.js:19
mode = 0777 & (~process.umask());
^^^^
SyntaxError: Octal literals are not allowed in strict mode.
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/leeching/coding.net/s-cms/node_modules/mocha/lib/reporters/xunit.js:10:14)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
npm ERR! Test failed. See above for more details. |
Ah, I should have tested it again after the rebase. The issue is a result of merging #1995 Edit: Looks like mkdirp 0.5.1 fixes this :) |
Fixed in master. Thanks! |
Support for passing along the
--use_strict
flag frommocha
to_mocha
. Also fixes a strict code incompatibility with the undeclared variableReporter
in_mocha
, as outlined in #1879.Tests all pass and the lib works on node v4.2.3 and v5.1.1.