-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Allow Configuring Fast Fail Behavior for Non-Glob Executions #512
Comments
It seems like when I use
The fast fail behavior is disabled but when I run |
Not the maintainer but IIUC Lines 527 to 536 in acb1ce5
(the names do seem confusing and possible we could consolidate these settings here — do we actually need two different variables there?) IIRC |
Woah thanks for the super fast reply. Interesting, seems like there's more dials to turn that I wasn't aware of. I didn't know insta had all these great features. I've been using the default RustRover test runner (triggered by the gutter buttons).
Just tried it out, seems like this is indeed the case! |
Cool! Possible these can be consolidated — I think Whereas @mitsuhiko let us know if you see this and happen to remember... as part of the effort to simplify things a bit. |
I've been a longtime user of insta but I previously found it to fall short around parameterized testing, namely generating snapshot tests for a bunch of test data. Recently, I discovered the glob feature and when looking into how it worked, I found
Setting.set_snapshot_suffix
I tried using
Setting.set_snapshot_suffix
to setup my own parametrized testing like this:but it seems like currently
insta
exits on the first test failure. It looks like glob gets around this by disabling fast failure hereinsta/insta/src/runtime.rs
Lines 501 to 514 in acb1ce5
For me there are use cases where I'd like parameterized snapshot tests but the input data is small and I'd like to define it inline with my test. I think there are others who'd find this useful too.
Would you be open to a PR adding an option to settings which allows for specifying fast fail for a specific test. I'm thinking if the setting for the current test is set to fast fail, and the snapshot match fails, fail immediately otherwise continue.
The text was updated successfully, but these errors were encountered: