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

Feature request: Add a flag for updating golden files interactively #247

Open
andremarianiello opened this issue Oct 20, 2022 · 2 comments

Comments

@andremarianiello
Copy link

It would be nice if there was a way to run the tests, and for each one that fails, prompt the user to decide whether to update the diff or not. Think a UX similar to git add -p

@dnephin
Copy link
Member

dnephin commented Oct 21, 2022

I like it! Maybe something like -update={ask,prompt,interactive}. Use the same flag, the value is still optional.

@dnephin
Copy link
Member

dnephin commented Dec 9, 2023

I looked into this a bit, and it sounds like unfortunately it is not possible. See https://echorand.me/posts/go-test-stdin/.

Go tests are run with os.Stdin set to /dev/null, so there's no input stream that can be used to prompt for input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants