Skip to content
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

Closed
mlippens opened this issue May 9, 2016 · 5 comments
Closed

Update WritingTests to not use arrow functions #1703

mlippens opened this issue May 9, 2016 · 5 comments
Labels

Comments

@mlippens
Copy link

mlippens commented May 9, 2016

Mocha advises against using arrow functions, so it seems wrong to me to use them in WritingTests.md as an example.

@SimenB
Copy link
Contributor

SimenB commented May 9, 2016

Why? Because of this?

@mlippens
Copy link
Author

mlippens commented May 9, 2016

That's what they say in the documentation of mocha, though myself I have not run into any issues with it so far.

@rosskevin
Copy link

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.

@SimenB
Copy link
Contributor

SimenB commented May 9, 2016

Node 4 supports arrow functions as well

@GGAlanSmithee
Copy link

If you need the Mocha context, only the outer most function must not be an arrow function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants