tests/testthat/_snaps/utils.md

check_is_named_list() works

Code
  user_facing_function(NULL)
Condition
  Error in `check_is_named_list()`:
  x `somevar` must be a list, not NULL.
Code
  user_facing_function(c(a = "a", b = "b"))
Condition
  Error in `check_is_named_list()`:
  x `somevar` must be a list, not a character vector.
Code
  user_facing_function(list("a", b = 2))
Condition
  Error in `check_is_named_list()`:
  x Names of `somevar` must be non-missing, non-empty, and non-duplicated.


Try the usethis package in your browser

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

usethis documentation built on Sept. 11, 2024, 5:29 p.m.