-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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 test suite
factory function should not be async
#187718
Comments
suite
factory function should not do setupsuite
factory function should not be asyn
suite
factory function should not be asynsuite
factory function should not be async
Once the PR for the eslint rule is in, you should just be able to see a warning by opening the file listed. To fix, make the second argument to the If you need to run async code during your suite setup, consider using a |
The PR for the lint rule causes hygiene to fail, so if you want to try the rule out to fix your change feel free to checkout #188378 and make your change on that branch. |
Now that debt week is beginning, please consider taking a look at the errors above so that we can merge this new eslint rule and prevent more unreliable tests to be written! |
There were no awaits so I think we can just remove them all which I did in #189171, merging that will close this out. |
Great, thanks @Tyriar! |
Oh opps, this will auto close. I see you will need to update the branch on #188378 and merge in before this is closed. |
We discovered in #187482 (comment) that some of our
suite
factory methods are async and can impact other tests as a result. After discussion, we have decided that we should limitsuite
factory methods so they cannot be async.The first step is to write an eslint rule to find async suite factory methods.
The second step is to fix all the places this occurs:
The text was updated successfully, but these errors were encountered: