test_that("can get info about external function", {
expect_snapshot(str(ext_topics("base::mean")))
# and column names match
pkg <- as_pkgdown(test_path("assets/reference"))
expect_equal(names(ext_topics("base::mean")), names(pkg$topics))
})
test_that("fails if documentation not available", {
expect_snapshot(ext_topics("base::doesntexist"), error = TRUE)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.