tests/testthat/test-html_document.R

test_that("knitr chunk hooks aren't duplicated", {
  skip_if_not(rmarkdown::pandoc_available("1.12.3"))
  tmphtml <- tempfile(fileext = ".html")
  rmarkdown::render("register/register.Rmd", output_file = tmphtml, quiet = TRUE)
  x <- read_lines(tmphtml)
  expect_equal(sum(grepl("test[.]R", x)), 1)
})
gadenbuie/js4shiny documentation built on March 25, 2024, 8:16 p.m.