tests/testthat/test-prepHeatmap.R

test_that(".prepHeatmap errors correctly", {
  expect_error(.prepHeatmap(""), 'is\\(x, "gg"\\) is not TRUE')
  p <- ggplot()
  # expect_error(
  #   .prepHeatmap(p, tibble(x = numeric())),
  #   'all\\(c\\("Filename", "Status"\\) %in% colnames\\(status\\)\\) is not TRUE'
  # )
  expect_error(
    .prepHeatmap(
      p, tibble(Filename = character(), Status = character()), segments = ""
    ),
    'all\\(c\\("x", "y", "xend", "yend"\\) %in% colnames\\(segments\\)\\) is not TRUE'
  )
})
steveped/ngsReports documentation built on May 9, 2024, 10:07 a.m.