tests/testthat/test-ui.R

test_that("cli_alert_success() works", {
  withr::local_options(emodnet.wfs.quiet = TRUE)
  expect_silent(cli_alert_success("hihihi"))

  withr::local_options(emodnet.wfs.quiet = FALSE)
  expect_snapshot(cli_alert_success("hihihi"))
})

test_that("cli_alert_info() works", {
  withr::local_options(emodnet.wfs.quiet = TRUE)
  expect_silent(cli_alert_info("hihihi"))

  withr::local_options(emodnet.wfs.quiet = FALSE)
  expect_snapshot(cli_alert_info("hihihi"))
})

test_that("cli_alert_danger() works", {
  withr::local_options(emodnet.wfs.quiet = TRUE)
  expect_silent(cli_alert_danger("hihihi"))

  withr::local_options(emodnet.wfs.quiet = FALSE)
  expect_snapshot(cli_alert_danger("hihihi"))
})

Try the emodnet.wfs package in your browser

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

emodnet.wfs documentation built on Aug. 8, 2025, 6:20 p.m.