-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
cargo insta test error: unexpected argument '--color' found #473
Comments
It seems that parsing the cli args here is the cause. On the one hand, it's probably not test best-practice to parse the CLI args in unit tests. On the other, insta shouldn't be interfering with that. And it's a very unfriendly error message. This stems from a very old issue in cargo: rust-lang/cargo#1983. In the meantime, a few options:
|
Thanks very much for the very prompt feedback, it's honestly really helpful ! I tried running everything once again while removing the CLI and it works perfectly now. : ) I apologise for my mistake, my problem is solved! Would you still like me to keep the issue open if you'd like to have a go at fixing it further on your side since you mentioned insta shouldn't be interfering with it anyway? Cheers |
Thanks @NoodleSamaChan !
I defer to @mitsuhiko ! |
What happened?
Whenever I try to run my insta tests, I receive an error message stating
I am really unsure about this error message since I didn't include any argument, especially not anything such as --color.
Would you know if there's any fixes for such a problem?
If needed, please find here the link to the code which carries the bug: https://github.com/NoodleSamaChan/pong/tree/58287b1f64ffb6b7e0b184ce959bf998c3874f51
Please note that if I run cargo test and then cargo insta review, I am able to generate the snapshot.
Reproduction steps
Insta Version
1.38.0
rustc Version
1.77.0
No response
What did you expect?
I was expecting the tests to run and the snapshots to be generated and ready for review
The text was updated successfully, but these errors were encountered: