test_that("deps works", {
d <- tempdir()
file.copy(f1 <- file.path("test_files", "example_report.Rmd"), d)
file.copy(f2 <- file.path("test_files", "example.R"), d)
file.copy(f3 <- file.path("test_files", "example2.R"), d)
deps <- deps(f1)
expect_equal(sort(deps), sort(c("knitr", "rmarkdown", "clipr", "base", "gert")))
deps <- deps(f2)
expect_equal(sort(deps), sort(c("fs", "yaml", "callr", "utils", "rprojroot")))
deps <- deps(f3)
expect_equal(deps, character())
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.