tests/testthat/tests.R

test_that("non-character input type", {
  expect_error(samplezoo(name = 123))
  expect_error(samplezoo(123))
})

test_that("name is incorrect", {
  expect_error(samplezoo(name = "extra-small"))
  expect_error(samplezoo("extrasmall"))
  expect_error(samplezoo("samll"))
  expect_error(samplezoo(name = "samll"))
})

test_that("needs quotations", {
  expect_error(samplezoo(small))
})

Try the samplezoo package in your browser

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

samplezoo documentation built on April 4, 2025, 1:16 a.m.