Best Practices For Insta Filtering/Redactions #674
Unanswered
NicholasLYang
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Possibly dynamic redactions? https://insta.rs/docs/redactions/ Then we can use a regex / any custom logic... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we're trying out Insta in turborepo. We currently use Prysk, which lets you write inline regexes into your snapshots (example). This is pretty convenient for stuff like normalizing paths across platforms.
I'm wondering what the equivalent solution would look like in Insta. I tried doing a filter that just replaces
\
with/
, but that isn't great because not all occurrences of\
are in paths. I can try to manually normalize the data before it reaches Insta, but that's a little tedious tbh. I could also split snapshots across OS, so I get aturbo_test_windows.snap
and aturbo_test_mac.snap
, but that makes updating snapshots difficult, especially across operating systems.To be clear, this isn't a feature request. I'm just curious what the idiomatic "Insta-y" solution would be.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions