-
Notifications
You must be signed in to change notification settings - Fork 316
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
snapshot_review()
is not finding any files to review
#1545
Comments
Reprex closer to what I'll test library(testthat)
local_edition(3)
# variant -----------------------------------------------------------------
snapper <- testthat:::local_snapshotter()
snapper$start_file("test", "test")
expect_warning(expect_snapshot_value("a", variant = "barret"))
snapper$end_file()
dir(snapper$snap_dir, recursive = TRUE)
snapper$start_file("test", "test")
expect_failure(expect_snapshot_value("b", variant = "barret"))
snapper$end_file()
dir(snapper$snap_dir, recursive = TRUE)
## Should list the "barret" snaps, but currently does not
snapshot_meta(path = dir)
# no variant -----------------------------------------------------------------
snapper <- testthat:::local_snapshotter()
snapper$start_file("test", "test")
expect_warning(expect_snapshot_value("a", variant = NULL))
snapper$end_file()
dir(snapper$snap_dir, recursive = TRUE)
snapper$start_file("test", "test")
expect_failure(expect_snapshot_value("b", variant = NULL))
snapper$end_file()
dir(snapper$snap_dir, recursive = TRUE)
snapshot_meta(path = dir) |
Hmmm at least part of the problem is that |
Even more minimal reprex: library(testthat)
path <- testthat:::local_snapshot_dir(c("v/test", "v/test.new"))
snapshot_accept(path = path)
#> Updating snapshots:
#> * v/test.md
path <- testthat:::local_snapshot_dir(c("test", "test.new"))
snapshot_accept(path = path)
#> Updating snapshots:
#> * test.md Created on 2022-01-07 by the reprex package (v2.0.1) |
Are you seeing this in real life? |
Yes. After updating to the latest from |
With |
Oooh, does |
The root problem is that |
From my terminal... (which is not a reprex, 😜 )
This shows that using
Yes! Skipping the
|
First half is with a
variant
. Second half is with novariant
.Both are failing to find any snaps to review.
Reprex:
Created on 2022-01-07 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: