tests/testthat/test-chattr-app.R

test_that("chattr_app() runs", {
  local_mocked_bindings(
    rstudioapi_jobRunScript = function(...) invisible(),
    rstudioapi_viewer = function(...) 0
  )
  withr::with_options(list("chattr-shiny-test" = TRUE), {
    test_model_backend()
    expect_length(chattr_app(as_job = TRUE), 1)
  })
})

Try the chattr package in your browser

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

chattr documentation built on June 8, 2025, 11:07 a.m.