Skip to content
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

Does not allow passing arguments #108

Open
kantord opened this issue Mar 9, 2022 · 4 comments
Open

Does not allow passing arguments #108

kantord opened this issue Mar 9, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@kantord
Copy link

kantord commented Mar 9, 2022

Describe the bug
If I run

TestNearest -u

then vim-test will update my jest snapshots (-u updates snapshot tests)

however if I run

UltestNearest -u

then it does not update the tests

To Reproduce

Expected behavior
Ultest should pass all the arguments to vim-test so that it works the same way

@rcarriga
Copy link
Owner

Ultest does not support setting arguments using the commands like vim-test does. You have to set the variable to configure your runner arguments beforehand.

@kantord
Copy link
Author

kantord commented Mar 10, 2022

It would be nice if it was supported. Are you against this feature in general?

You have to set the variable to configure your runner arguments beforehand.

This only works for the use case when you pass arguments for the purposes of configuration. -u actually sends an instruction to jest to update snapshots. Putting that in the runner configuration would be an invalid usage of jest

@kantord
Copy link
Author

kantord commented Mar 10, 2022

Or is there an alternative way to support jest snapshot testing? I could not find any other issues or any documentation regarding this: https://github.com/rcarriga/vim-ultest/search?q=snapshot&type=issues

@rcarriga
Copy link
Owner

I'm not opposed to having command line parsing, I just have no use of it myself and have never done it in vimscript before so haven't gotten around to it. Totally open to PRs though!

Alternatively you could script it to have another command to alter the config var to add -u for the one usage and then remove it. There is also g:ultest_pre_run which might also be useful but might not if you only want to set it manually

@rcarriga rcarriga added the enhancement New feature or request label Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants