So I was creating unit tests for some functions with testthat and I was having some problems with using expect_error() with errors created by
testthat
expect_error()