-
-
Notifications
You must be signed in to change notification settings - Fork 761
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 discourages arrow functions in tests #297
Comments
Not really, it is probably a good idea to change it back to normal functions as they suggest. If you have the time, a pull request changing the test files in https://github.com/feathersjs/generator-feathers/tree/master/generators would be awesome. |
OK, I'll take a look through the genies and try to get a suitable PR put together. |
@daffl any advice on how I tell Yeoman to use my modified generators for testing the changes? I've only dealt with Yo as a user and not even that often. |
In the generator repository run |
One thing that stumped me after I first updated the generated tests was that none of the non-transform tests were succeeding, all for exit codes not being zero. I eventually added a console.log to show the tmp dir path so I could go in and run the tests directly on the generated app. It was jshint complaining about semicolons. Seems like there should be a way to pipe those jshint failures to the output so it's clearer why the test failed. I'm not sure how that would be accomplished, but would gladly take pointers and work up another PR. |
Pass fewer arrow functions to Mocha. feathersjs/feathers#297
Thanks a lot for the PR! I noticed, too that there wasn't a lot of error reporting when the app test command fails so I added feathersjs-ecosystem/generator-feathers@f006e4d to the tests. Now we should get an error with the full output of the test run. I'm going to close this issue and will make a new release of the generator shortly. |
@daffl I saw your commit earlier for the better error reporting and of course had to try it out. Perfect! |
Pass fewer arrow functions to Mocha. #297
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs. |
Just getting started with first FJS project. Was working on initial tests this morning and ran into this while trying to increase a test's timeout:
https://mochajs.org/#arrow-functions
Are there any arguments for sticking with Arrow functions for generated tests?
The text was updated successfully, but these errors were encountered: