How to browse snapshots from a test file?
(Maybe rather an IDE question)
If I'm reading tests to gain an understanding of what the code is doing, how can I easily access the snapshots? Currently I do that by clicking.
More often of course I interact with snapshots when they fail or when I add some. :sweat_smile:
I have wondered if we need a use_snapshot() to parallel use_r()/use_test()
I was just thinking that use_snapshot() would be helpful, then found this!
Moving this to usethis
Similarly it would be nice if use_r()/use_test() took you to the right place when a snapshot file was open.
lol I have no memory of ❤️ing this.
use_r("filename") and use_test("filename") do things that make sense when the files don't exist. For use_snapshot("filename"), we'd require that the snapshot already exists, right? I assume the signature should look like this:
use_snapshot(name = NULL, variant = NULL, open = rlang::is_interactive())
I'll probably go ahead and knock this out real quick assuming those thoughts are valid, I just wanted to think through it in case something didn't make sense.