tests/testthat/test-checkServices.R

test_that("Services must be specified in a vector", {
  expect_error(
    .checkServices(
      services = 123,
      choices = c("a", "b", "c")))
})

test_that("Choices must be specified in a vector", {
  expect_error(
    .checkServices(
      services = c("a", "b", "c"),
      choices = 123))
})

test_that("Services must be contained in choices", {
  expect_error(
    .checkServices(
      services = c("a", "b"),
      choices = c("d", "e", "f")))
})

test_that("Excepct no error if services are contained in choices", {
  expect_no_error(
    .checkServices(
      services = c("a", "b"),
      choices = c("a", "b", "c")))
})

Try the eppoFindeR package in your browser

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

eppoFindeR documentation built on April 25, 2026, 1:07 a.m.