-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
Update WritingTests to not use arrow functions #1703
Comments
Why? Because of |
That's what they say in the documentation of mocha, though myself I have not run into any issues with it so far. |
Mocha doesn't want you to use arrow functions only so that you can access the mocha instance to set expirations etc, otherwise, arrow functions work just fine. I expect Mocha will need to adapt that approach soon as since the arrow fn syntax is being adopted quickly and since node 6 is out. |
Node 4 supports arrow functions as well |
If you need the Mocha context, only the outer most function must not be an arrow function. |
Mocha advises against using arrow functions, so it seems wrong to me to use them in WritingTests.md as an example.
The text was updated successfully, but these errors were encountered: