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
You'd need to use rlang::inject() or similar for this:
library(testthat)
test_that("wrong", {
local_edition(3)
purrr::walk(
letters[1:3],
\(x) rlang::inject(expect_snapshot(message(!!x)))
)
})
#> Can't compare snapshot to reference when testing interactively.#> ℹ Run `devtools::test()` or `testthat::test_file()` to see changes.#> Current value:#> Code#> message("a")#> Message#> a#> Can't compare snapshot to reference when testing interactively.#> ℹ Run `devtools::test()` or `testthat::test_file()` to see changes.#> Current value:#> Code#> message("b")#> Message#> b#> Can't compare snapshot to reference when testing interactively.#> ℹ Run `devtools::test()` or `testthat::test_file()` to see changes.#> Current value:#> Code#> message("c")#> Message#> c#> ── Skip: wrong ─────────────────────────────────────────────────────────────────#> Reason: empty test
Result:
The text was updated successfully, but these errors were encountered: