tests/testthat/test-app.R

test_that("stop_app() errors", {
  expect_snapshot(
    error = TRUE,
    stop_app(1:10)
  )
})

test_that("warning if inactive app", {
  app <- start_app(.auto_close = FALSE)
  stop_app(app)
  expect_snapshot(
    stop_app(app)
  )
})

Try the cli package in your browser

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

cli documentation built on March 31, 2023, 9:04 p.m.