tests/testthat/test-msgs_common.R

test_that("object_type returns expected types", {
  expect_identical(
    object_type(factor(letters)),
    "factor"
  )
  expect_identical(
    object_type(),
    "missing"
  )
  expect_identical(
    object_type(quote(mean(1:10))),
    "call"
  )
  expect_identical(
    object_type(rlang::quo(whatever)),
    "quosure"
  )
})

Try the stbl package in your browser

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

stbl documentation built on May 29, 2024, 5:52 a.m.