tests/testthat/test-plot_raincloud.R

test_that("raincloud plot is returned in the correct format", {
  expect_equal(class(plot_raincloud(peak_values_list, D = D)), c("gg", "ggplot"))
})

test_that("the first argument is not a list with at least two elements", {
  expect_error(
    plot_raincloud(c(1:10), D = D),
    class = "data_type"
  )
  expect_error(
    plot_raincloud(peak_values_list$Baseline, D = D),
    class = "data_type"
  )
})

Try the DUToolkit package in your browser

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

DUToolkit documentation built on Sept. 14, 2025, 5:09 p.m.