tests/testthat/_snaps/mk_lookup_utils.md

get fails with message for missing type

Code
  get_new_lkup()$get()
Error <jute_error>
  `type` must be supplied but is missing

get fails with message for nonexistent type

Code
  get_new_lkup()$get("nonexistent")
Error <jute_error>
  `type` must be a known lookup type
  x You've supplied an unrecognised type 'nonexistent'.

descrip fails with message for missing key

Code
  get_new_lkup()$descrip(lookup = lkup)
Error <jute_error>
  `key` must be supplied but is missing

descrip fails with message for invalid key

Code
  get_new_lkup()$descrip("danish", "numbers")
Error <jute_error>
  `key` must exist in the lookup table
  x You've supplied an invalid key 'danish'.

descrip fails with message if both type and lookup are NULL

Code
  get_new_lkup()$descrip("spanish")
Error <jute_error>
  You must supply at least one of `type` and `lookup`
  x Both `type` and `lookup` are NULL.


toniprice/jute documentation built on Jan. 11, 2023, 8:23 a.m.