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
This problem appears when the test file has a dot in its name, like test-hello.foo.R. However, I can't reproduce it with dashes in the name like in the original issue. I put a small reprex on this repo: snapshotreprex.
To reproduce:
change the message in R/hello.R
run the tests. This correctly detects the change in the output
run testthat::snapshot_review('windows/hello.foo') (or click it)
output: "No snapshots to update"
In tests/testthat/_snaps/windows, there are hello.foo.md and hello.foo.new.md.
Edit: running testthat::snapshot_review('windows/hello.foo.md') works, so maybe it just requires a small update to testthat message
aj-sykes92
added a commit
to aj-sykes92/testthat
that referenced
this issue
May 15, 2024
Adjusted snapshot_meta helper function to adjust check for presence of file extension in `files` argument. Fixes issue where periods in file name are mistaken for signifying file extension (r-lib#1579).
Hello!
I'm not really sure how to distill this down to a reprex, but when I have an existing change in my snapshot testing, like so:
when I run
I get
I would expect that given my snapshots have changed, I should see the really nice diff window from
snapshot_review()
, but I do not.Below is my sessionInfo, if that helps
Session info
The text was updated successfully, but these errors were encountered: