swh:1:snp:bdc19e867479541d0f4994ceaa711217d0dc28ed
Tip revision: 74b598025322cd572dcd58326f0c5fb465f503ab authored by Hadley Wickham on 23 June 2022, 13:00:02 UTC
version 2.0.5
version 2.0.5
Tip revision: 74b5980
test-figure.R
test_that("can override defaults in _pkgdown.yml", {
skip_if_no_pandoc()
withr::local_temp_libpaths()
pkg <- local_pkgdown_site(test_path("assets/figure"))
callr::rcmd("INSTALL", pkg$src_path, show = FALSE, fail_on_status = TRUE)
expect_output(build_reference(pkg, devel = FALSE))
img <- path_file(dir_ls(path(pkg$dst_path, "reference"), glob = "*.jpg"))
expect_setequal(img, c("figure-1.jpg", "figure-2.jpg"))
expect_output(build_articles(pkg))
img <- path_file(dir_ls(path(pkg$dst_path, "articles"), glob = "*.jpg", recurse = TRUE))
expect_equal(img, "unnamed-chunk-1-1.jpg")
})