tests/testthat/test-plot.dw_data_tabulate.R

test_that("`plot.dw_data_tabulate()` works with single table", {
  x <- datawizard::data_tabulate(mtcars, select = "cyl")
  expect_s3_class(plot(x), "gg")
})

test_that("`plot.dw_data_tabulate()` works with multiple tables", {
  x <- datawizard::data_tabulate(mtcars, select = c("cyl", "carb", "am"))
  expect_true(is.list(plot(x)))
})

Try the see package in your browser

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

see documentation built on Nov. 3, 2023, 5:10 p.m.