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
feature request: ava configs' factory function promise support. #1934
Comments
Yup, we can do that. The restriction was added to reduce the complexity of adding this feature in the first place. We'll have to make Line 24 in bfe1630
We'll also need to figure out how to make this work in our ESLint plugin: https://github.com/avajs/eslint-plugin-ava/blob/6bb239fe1cd97fd671318253debc153fab7db071/util.js#L47 |
sounds good |
Hi, can help out and continue where things were left off, I just made a PR #2076 |
Thanks @novemberborn , if i have any questions ill ask here, and ill do my best to add this feature. |
Sorry for opening and closing the PR I had opened before , I did too many commits on it , the changes i made kept failing the tests, to go back to previous version or to the original is the command git checkout -f or git reset --hard or git-revert ,Also I am trying to continue where @MiguelSolano left off |
@a-deeb don't worry about the commit history, we can fix that when we land the PR. There's many different ways of going back to a previous version. Perhaps give GitHub Desktop a try. They've got a post on it here: https://help.github.com/en/desktop/contributing-to-projects/reverting-a-commit This post has some good information on pushing changes: https://www.atlassian.com/git/tutorials/syncing/git-push I can't review your code if you keep closing the PR. Just leave #2077 open and let me know when you'd like me to take a look at it. |
Thanks again @novemberborn ! |
Our ESLint plugin now relies on AVA's config, and the ESLint plugin must be synchronous. I'm not sure where that leaves us with supporting asynchronous factories. |
we still can support async config factories, but eslint plugin can be turned into synchronous with setTimeout or something |
You can't go from asynchronous to synchronous. |
true, sorry, I had a brain fart |
I'll close it then |
No I'd still like to support this. But we need to figure out the impact on our ESLint plugin. Maybe ESLint will support asynchronous plugins. Maybe, as long config-reliant rules are opt-in, we can make them fail when the config is asynchronous. |
This will be available in AVA 4. |
Description
vs
I propose to add support for a promise from a factory function, because in my case i need to look around the environment I am going to run tests for and read some files. I can use synchronous versions of fs module, but it is contrary to node's guidelines and Ava's spirit.
Test Source
Error Message & Stack Trace
Config
N/A, see above.
Command-Line Arguments
N/A
Relevant Links
Environment
The text was updated successfully, but these errors were encountered: