/BS5/assets/pkgdown.js to pkgdown.js
Copying pkgdown/extra.css to extra.css
+ Updating deps/MathJax-2.7.5/MathJax.js
+ Updating deps/MathJax-2.7.5/TeX-AMS-MML_HTMLorMML.js
Updating deps/bootstrap-5.3.1/bootstrap.bundle.min.js
Updating deps/bootstrap-5.3.1/bootstrap.bundle.min.js.map
Updating deps/bootstrap-5.3.1/bootstrap.min.css
+ Updating deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js
+ Updating deps/clipboard.js-2.0.11/clipboard.min.js
+ Updating deps/font-awesome-6.4.2/css/all.css
+ Updating deps/font-awesome-6.4.2/css/all.min.css
+ Updating deps/font-awesome-6.4.2/css/v4-shims.css
+ Updating deps/font-awesome-6.4.2/css/v4-shims.min.css
+ Updating deps/font-awesome-6.4.2/webfonts/fa-brands-400.ttf
+ Updating deps/font-awesome-6.4.2/webfonts/fa-brands-400.woff2
+ Updating deps/font-awesome-6.4.2/webfonts/fa-regular-400.ttf
+ Updating deps/font-awesome-6.4.2/webfonts/fa-regular-400.woff2
+ Updating deps/font-awesome-6.4.2/webfonts/fa-solid-900.ttf
+ Updating deps/font-awesome-6.4.2/webfonts/fa-solid-900.woff2
+ Updating deps/font-awesome-6.4.2/webfonts/fa-v4compatibility.ttf
+ Updating deps/font-awesome-6.4.2/webfonts/fa-v4compatibility.woff2
+ Updating deps/headroom-0.11.0/headroom.min.js
+ Updating deps/headroom-0.11.0/jQuery.headroom.min.js
Updating deps/jquery-3.6.0/jquery-3.6.0.js
Updating deps/jquery-3.6.0/jquery-3.6.0.min.js
Updating deps/jquery-3.6.0/jquery-3.6.0.min.map
+ Updating deps/search-1.0.0/autocomplete.jquery.min.js
+ Updating deps/search-1.0.0/fuse.min.js
+ Updating deps/search-1.0.0/mark.min.js
# site meta doesn't break unexpectedly
diff --git a/tests/testthat/_snaps/render.md b/tests/testthat/_snaps/render.md
index 514d8979d..420a49623 100644
--- a/tests/testthat/_snaps/render.md
+++ b/tests/testthat/_snaps/render.md
@@ -61,6 +61,7 @@
footer:
left: Developed by Hadley Wickham, RStudio.
right: Site built with pkgdown {version}.
+ lightswitch: no
# check_opengraph validates inputs
diff --git a/tests/testthat/test-external-deps.R b/tests/testthat/test-external-deps.R
new file mode 100644
index 000000000..730f0eb26
--- /dev/null
+++ b/tests/testthat/test-external-deps.R
@@ -0,0 +1,15 @@
+test_that("check integrity validates integrity", {
+ temp <- withr::local_tempfile(lines = letters)
+
+ expect_snapshot(error = TRUE, {
+ check_integrity(temp, "sha123-abc")
+ check_integrity(temp, "sha256-abc")
+ })
+
+ integrity <- paste0("sha256-", compute_hash(temp, 256L))
+ expect_no_error(check_integrity(temp, integrity))
+})
+
+test_that("can parse integrity", {
+ expect_equal(parse_integrity("sha256-abc"), list(size = 256L, hash = "abc"))
+})
diff --git a/tests/testthat/test-package.R b/tests/testthat/test-package.R
index 5a262a6d1..ef068eb64 100644
--- a/tests/testthat/test-package.R
+++ b/tests/testthat/test-package.R
@@ -98,11 +98,18 @@ test_that("read_meta() errors gracefully if _pkgdown.yml failed to parse", {
# lifecycle ---------------------------------------------------------------
-test_that("can extract lifecycle badges", {
- expect_equal(
- extract_lifecycle(rd_text(lifecycle::badge("deprecated"))),
- "deprecated"
+test_that("can extract lifecycle badges from description", {
+ rd_desc <- rd_text(
+ paste0("\\description{", lifecycle::badge("deprecated"), "}"),
+ fragment = FALSE
+ )
+ rd_param <- rd_text(
+ paste0("\\arguments{\\item{pkg}{", lifecycle::badge("deprecated"), "}}"),
+ fragment = FALSE
)
+
+ expect_equal(extract_lifecycle(rd_desc), "deprecated")
+ expect_equal(extract_lifecycle(rd_param), NULL)
})
test_that("malformed figures fail gracefully", {