tests/testthat/test-shiny-devmode.R
raw| 1 | |
| 2 | test_that("shiny devmode shuts off default caching", { |
| 3 | |
| 4 | expect_equal( |
| 5 | identical( |
| 6 | sass_cache_get(), |
| 7 | NULL |
| 8 | ), |
| 9 | FALSE |
| 10 | ) |
| 11 | |
| 12 | |
| 13 | withr::local_options(list( |
| 14 | shiny.devmode = TRUE, |
| 15 | shiny.devmode.verbose = FALSE |
| 16 | )) |
| 17 | withr::local_envvar(list( |
| 18 | TESTTHAT = "false" |
| 19 | )) |
| 20 | |
| 21 | expect_equal( |
| 22 | identical( |
| 23 | sass_cache_get(), |
| 24 | NULL |
| 25 | ), |
| 26 | TRUE |
| 27 | ) |
| 28 | |
| 29 | }) |