tests/testthat/test-is_island_ontogeny_input.R

test_that("Returns TRUE when correct", {
  testthat::expect_true(
    is_island_ontogeny_input(island_ontogeny = "const")
  )
  testthat::expect_true(
    is_island_ontogeny_input(island_ontogeny = "beta")
  )
})

test_that("Returns FALSE when not string", {
  testthat::expect_false(
    is_island_ontogeny_input(island_ontogeny = 2)
  )
})

test_that("Returns FALSE when wrong string", {
  testthat::expect_false(
    is_island_ontogeny_input(island_ontogeny = "nonsense")
  )
})

Try the DAISIE package in your browser

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

DAISIE documentation built on Oct. 22, 2023, 1:06 a.m.