Get more granular info on snapshot pass/fail when using globs #283
Replies: 2 comments
-
Today that's indeed a bit annoying. Unfortunately there is no way for me to generate a test function for each glob expansion and rusttest does not provide an API to "generate" tests at runtime. Potentially it might be possible to "defer" the panics when using |
Beta Was this translation helpful? Give feedback.
0 replies
-
I added experimental support for this on a PR. Do you mind giving it a try? #284 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, thank you for the amazing snapshot library. It is incredibly useful!
I am using insta to test a code formatting tool, and I have now got quite a few snapshots (https://github.com/JohnnyMorganz/StyLua/tree/main/tests/snapshots). My snapshot inputs are currently loaded in using a glob pattern - https://github.com/JohnnyMorganz/StyLua/blob/main/tests/tests.rs
I am looking to perform a complete rewrite of the internals of the tool, but the input and output of the tool should remain the same, so snapshots shouldn't change. Since I have a large library of existing snapshots, this helps me a lot in testing.
Whilst working on this, I want to gauge the progress I am making. I am doing this using
cargo test
, but unfortunately it halts on the first snapshot failure.What I want to see is, out of all the snapshots, which are currently passing or failing, similar to how vanilla
cargo test
works for each#[test]
. Is there a way to do this?cargo test
will produce something like this:but I want more granular pass/fail information for each snapshot input in
test_standard
etc.cargo insta test
will go through and regenerate new snapshots, which is not what I am looking forBeta Was this translation helpful? Give feedback.
All reactions