expect_snapshot_with_error <- function(code) {
code <- rlang::enexpr(code)
if (packageVersion("testthat") > "3.0.0") {
rlang::eval_tidy(rlang::quo(expect_snapshot(!!code, error = TRUE)))
} else {
rlang::eval_tidy(rlang::quo(expect_snapshot(!!code)))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.