tests/testthat/helper.R

expect_equal <- function(object, expected,
                         check.attributes = FALSE,
                         info = NULL,
                         label = NULL,
                         expected.label = NULL) {
  if (inherits(object, "fy") && is.character(expected)) {
    object <- as.character(object)
  }
  if (inherits(expected, "fy") && is.character(object)) {
    expected <- as.character(expected)
  }
  testthat::expect_equal(object, expected,
                         check.attributes = check.attributes,
                         info = info,
                         label = label,
                         expected.label = expected.label)
}

Try the fy package in your browser

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

fy documentation built on Sept. 12, 2023, 9:06 a.m.