tests/testthat/test-run_qc.R

test_that("HTML file is created and content is correct", {
  testthat::skip_on_cran()

  # Does the thing run?
  gimap_dataset <- get_example_data("gimap")

  html_file <- run_qc(gimap_dataset,
    output_file = tempfile(),
    plots_dir = tempdir(),
    open_results = FALSE,
    overwrite = TRUE
  )

  expect_true(file.exists(html_file))

  # Test the other dataset too
  gimap_dataset <- get_example_data("gimap_treatment")

  html_file <- run_qc(gimap_dataset,
    output_file = tempfile(),
    plots_dir = tempdir(),
    open_results = FALSE,
    overwrite = TRUE
  )

  expect_true(file.exists(html_file))
})

Try the gimap package in your browser

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

gimap documentation built on June 8, 2025, 10:13 a.m.