tests/testthat/test-aaa_warm-chromote.R

# https://github.com/rstudio/shinytest2/blob/c29b78e9/tests/testthat/test-aaa.R
skip_on_cran() # Uses chromote

# Try to warm up chromote. IDK why it fails on older versions of R.
test_that("Chromote loads", {
    on_ci <- isTRUE(as.logical(Sys.getenv("CI")))
    skip_if(!on_ci, "Not on CI")

    # Wrap in a `try()` as the test doesn't matter
    # Only the action of trying to open chromote matters
    try({
        chromote <- chromote::default_chromote_object()
        chromote$new_session()
    })

    expect_true(TRUE)
})

Try the renderthis package in your browser

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

renderthis documentation built on Sept. 24, 2022, 9:07 a.m.