tests/testthat/test-inspect_numberid.R

# common cases
test_that("inspect_numberid detects if number has the expected length", {
  expect_equal(inspect_numberid(12345, 5), TRUE)
  expect_equal(inspect_numberid(123, 5), FALSE)
  expect_equal(inspect_numberid("AAA0101", 4), FALSE)
  expect_error(inspect_numberid(123.456))
})

Try the trustmebro package in your browser

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

trustmebro documentation built on June 8, 2025, 11:01 a.m.