tests/testthat/test-tutorial-format.R

test_that("tutorial() returns an rmarkdown format", {
  expect_true(inherits(tutorial(), "rmarkdown_output_format"))
})

test_that("tutorial() does not support anchor_sections", {
  expect_error(tutorial(anchor_sections = TRUE), "do not support")
  expect_error(tutorial(anchor_sections = FALSE), "do not support")
})

Try the learnr package in your browser

Any scripts or data that you put into this service are public.

learnr documentation built on Sept. 28, 2023, 9:06 a.m.