tests/testthat/test-shiny-devmode.R

test_that("shiny devmode shuts off default caching", {

  expect_equal(
    identical(
      sass_cache_get(),
      NULL
    ),
    FALSE
  )


  withr::local_options(list(
    shiny.devmode = TRUE,
    shiny.devmode.verbose = FALSE
  ))
  withr::local_envvar(list(
    TESTTHAT = "false"
  ))

  expect_equal(
    identical(
      sass_cache_get(),
      NULL
    ),
    TRUE
  )

})

Try the sass package in your browser

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

sass documentation built on May 29, 2024, 11:51 a.m.