Nothing
# if vdiffr is not installed, all visual tests are skipped
# if it is installed, change the argument order to make it easier to pipe
if (requireNamespace("vdiffr", quietly = TRUE) && utils::packageVersion("testthat") >= "3.0.3") {
expect_doppelganger <- function(fig, title, ...) {
# The R skip is about the graphics engine, not about ggplot2, and it stays
# until the R floor moves. Measured on the matrix: identical package
# versions throughout -- vdiffr 1.0.9, systemfonts 1.3.2, fontquiver 0.2.1
# -- and R 4.1 still redraws every text-bearing plot differently, while
# macOS and Windows match Linux exactly. So this is not platform drift, and
# the floor row is there to prove the package WORKS at its declared R
# floor; how it looks there is not part of that claim.
if (getRversion() < "4.2") {
skip("visual snapshots are written against a newer R graphics engine")
}
vdiffr::expect_doppelganger(title, fig, ...)
}
} else {
# If vdiffr is not available and visual tests are explicitly required, raise error.
if (identical(Sys.getenv("VDIFFR_RUN_TESTS"), "true")) {
abort("vdiffr is not installed")
}
# Otherwise, assign a dummy function
expect_doppelganger <- function(...) skip("vdiffr is not installed.")
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.