tests/testthat/test-utils.R

test_that("set chunk options", {
  set(knitr::opts_chunk, c("foo", "bar"), list(1L, 2L))
  expect_identical(knitr::opts_chunk$get("foo"), 1L)
  expect_identical(knitr::opts_chunk$get("bar"), 2L)
})

Try the chunkhooks package in your browser

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

chunkhooks documentation built on Aug. 5, 2020, 5:09 p.m.