tests/testthat/_snaps/to_lst.md

to_lst() respects allow_null (#157)

Code
  to_lst(given, allow_null = FALSE)
Condition
  Error:
  ! `given` must not be <NULL>.
Code
  wrapped_to_lst(given, allow_null = FALSE)
Condition
  Error in `wrapped_to_lst()`:
  ! `val` must not be <NULL>.

to_lst() errors by default for functions (#157)

Code
  to_lst(given)
Condition
  Error:
  ! `given` must not be a <function>.
Code
  wrapped_to_lst(given)
Condition
  Error in `wrapped_to_lst()`:
  ! `val` must not be a <function>.

to_lst() errors informatively for primitives (#157)

Code
  to_lst(given, coerce_function = TRUE)
Condition
  Error:
  ! Can't coerce `given` <primitive function> to <list>.
Code
  wrapped_to_lst(given, coerce_function = TRUE)
Condition
  Error in `wrapped_to_lst()`:
  ! Can't coerce `val` <primitive function> to <list>.


Try the stbl package in your browser

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

stbl documentation built on April 4, 2026, 5:06 p.m.