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

Defer glob failures #284

Merged
merged 4 commits into from Sep 11, 2022
Merged

Defer glob failures #284

merged 4 commits into from Sep 11, 2022

Conversation

mitsuhiko
Copy link
Owner

This is an experimental feature to address #283

@JohnnyMorganz
Copy link
Contributor

Thanks for the quick turnaround!
This does now continue through all snapshot failures and print out a count in the end, but it is very noisy, and it also regenerates all the snapshots (my expectation is that cargo test shouldn't regenerate snapshots whilst cargo insta test does, but that might be wrong)
image

Once it goes through all the failures it then prints out all the snapshot differences, and since there are 66 of them its a lot:
image

(Also, minor typo failuress at the end there)

Is it possible to make it instead print something equivalent to rusttest output (maybe behind a flag for quiet output?)

tests__standard@ambiguous-syntax.lua  ... ok
tests__full_moon_test_suite@anonymous-functions-2  ... FAILED

@mitsuhiko
Copy link
Owner Author

The default of INSTA_UPDATE is auto mode where if it's not in CI it will write new files. Try again with INSTA_UPDATE=no then it should not generate any changed snapshots like it would in CI.

@JohnnyMorganz
Copy link
Contributor

JohnnyMorganz commented Sep 4, 2022

The default of INSTA_UPDATE is auto mode where if it's not in CI it will write new files. Try again with INSTA_UPDATE=no then it should not generate any changed snapshots like it would in CI.

Ah yep, that stopped it, thanks.
The main thing is just the noisy "snapshot differences" section still, a quieter overview would be awesome.

Also, just a side note, since its not failing on first snapshot error, cargo test can take a little bit longer (2s vs 7s when keep going). It doesn't really matter to me, but it may be inconvenient for others (its heavily dependent on the code being tested).

@mitsuhiko
Copy link
Owner Author

It might be interesting to couple it with the failfast option of rusttest. That way it aligns with what users might already use. Will give that a whirl.

@mitsuhiko
Copy link
Owner Author

Turns out that the fail fast flag is only passed to the cargo wrapper so I won't be able to access this. Adding another flag to envvars is unlikely to be discoverable. I will try around with this a bit.

@mitsuhiko mitsuhiko merged commit 248fc1a into master Sep 11, 2022
@mitsuhiko mitsuhiko deleted the feature/defer-glob-failures branch September 11, 2022 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants