-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: cli option of config file --config-file [path]
#1857
Comments
--config-file [path]
--config-file [path]
Yes we left this as a follow-up. Some things to consider:
|
I need this also! |
+1 in my case, as in my comment against #1820, i can't use
|
Maybe we will run into a problem which a project root folder has so many xxx.config.js files my opinion
|
@bichikim could you clarify your answer? It doesn't quite map to my questions, and I don't want to presume anything 😄 |
Would also appreciate this. I'd like to make the config file a dotfile. Try to put them all in dotfiles to shunt them out of view. |
Seems sensible. If someone explicitly specifies a custom config file, probably not surprising if that becomes the sole config.
The command line argument would work fine for me. I set up an npm script to run ava, so that's a fine place to put the arg. I do JSDoc that way - one config file, one arg in the script. Another benefit to this would be easy setup of separate test suites. Just make a config file for each, and an npm script for each. Clean all around.
"scripts": {
"unit-test": "ava -C .unittest.conf.js",
"integration-test": "ava -C .integrationtest.conf.js",
"network-test": "ava -C .networktest.conf.js"
} |
I agree. The implicit question is whether we should print a warning.
I frequently use |
@novemberborn like it |
@issuehunt has funded $60.00 to this issue.
|
I was looking into the code to make the change. The only options I can think about are:
Something I saw someone else suggesting in another thread is to just use environment variables in ava.config.js to export the config for each scenario. This solution makes more sense to me at this point. |
This comment has been minimized.
This comment has been minimized.
We could use a different library to look for the
Regardless we're still keen on a |
Shouldn’t relative paths be allowed? For example:
|
@rauschma I believe location is forced for now #2166 (comment) Didn't try it yet though. |
@vladimiry Yes it is, I just tried it. |
Prerequisites
Description
hi 👋,
I'm attempting to build nodejs flavour of react-scripts from create-react-app. But instead of jest I would love to use ava. Unfortunately, there is no way to put config inside the project itself. Currently it gotta be either in package.json or in ava.config.js. It will help a lot if I can point ava to the relevant config.
It's very common feature, i can help to implement it.
Relevant Links
IssueHunt Summary
Sponsors (Total: $60.00)
Become a sponsor now!
Or submit a pull request to get the deposits!
Tips
The text was updated successfully, but these errors were encountered: