You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with similar semantics; test the filter string against the name of the snapshot, and only test it if it matches.
Minimally, this would change SnapshotAssertionContext to read INSTA_FILTER and test the name, with runtime::assert_snapshot containing an if ctx.disabled() { return } early out.
That's not super useful, though, as the only thing skipped is the snapshot comparison, and perhaps loading the old snapshot.
Where this is actually useful is with insta::glob!; if glob! can skip the execution of not-selected paths, then it's possible to test just a single execution of the glob! tests, and e.g. debug just that single snapshot test with breakpoints.
As such, it probably makes more sense to call this INSTA_GLOB_FILTER with the semantics of glob_exec building a second GlobMatcher from INSTA_GLOB_FILTER and only executing the closure if that also matches the input file.
The text was updated successfully, but these errors were encountered:
with similar semantics; test the filter string against the name of the snapshot, and only test it if it matches.
Minimally, this would change
SnapshotAssertionContext
to readINSTA_FILTER
and test the name, withruntime::assert_snapshot
containing anif ctx.disabled() { return }
early out.That's not super useful, though, as the only thing skipped is the snapshot comparison, and perhaps loading the old snapshot.
Where this is actually useful is with
insta::glob!
; ifglob!
can skip the execution of not-selected paths, then it's possible to test just a single execution of theglob!
tests, and e.g. debug just that single snapshot test with breakpoints.As such, it probably makes more sense to call this
INSTA_GLOB_FILTER
with the semantics ofglob_exec
building a secondGlobMatcher
fromINSTA_GLOB_FILTER
and only executing the closure if that also matches the input file.The text was updated successfully, but these errors were encountered: