😎 Give your xaringan slides some style
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
514B

  1. context("test-style_xaringan")
  2. test_that("style_xaringan() writes to specified outfile", {
  3. tmpfile <- tempfile(fileext = ".css")
  4. expect_equal(style_xaringan(outfile = tmpfile), tmpfile)
  5. expect_true(file.exists(tmpfile))
  6. expect_true(grepl("xaringanthemer", readLines(tmpfile)[3]))
  7. })
  8. test_that("style_xaringan() warns if base_font_size is not absolute", {
  9. tmpfile <- tempfile(fileext = ".css")
  10. expect_warning(
  11. style_xaringan(outfile = tmpfile, base_font_size = "1em"),
  12. "absolute units"
  13. )
  14. })