-
Notifications
You must be signed in to change notification settings - Fork 668
Allow for separate config file #523
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
Comments
We currently have a global config object. We could merge the two, with the inline config taking precedence over the file. Would you like to make a PR adding this feature? |
What are the benefits of supporting configuration files? |
I think the value of a config file is that Another solution would be allow the config to set all options (right now it only supports |
We should definitely support all options in the config object, regardless of whether we support a config file or not. |
Agreed. I'll make a PR for #325 in an hour or so (just writing the tests now) for supporting |
Thank you for replying. IMHO, Supporting all options in the config object is other issue. |
I agree with @38elements, adding an extra config file adds a lot of work on our end. Since we already have a config object, all the setup can be done in there. I'm closing this as something we aren't going to implement. |
What problem does this feature solve?
I work in a non English speaking country, so we are using
vue-i18n
to create a bilingual app. It adds a global$t
function. I have to do:in every test, or the test fails with
$t is undefined
, since almost all components have some form of text.Other users have a similar use case to mock regularly occurring global objects. More comments in this thread: #325
What does the proposed API look like?
I still think a config file would be good. I'm thinking something along the lines of a
test-utils.config.js
that could be something like this:You should be able to provide defaults for anything you can pass in the
options
object toshallow
andmount
.vue-test-utils
shouls look for a default config file in the root directory (for exampletest-utils.config.js
).The text was updated successfully, but these errors were encountered: