tests/testthat/test-plt-box.R

test_that("bcat_plt_box returns ggplot", {
  p <- bcat_plt_box(mtcars, x = factor(cyl), y = mpg)
  expect_true(inherits(p, "ggplot"))
})

test_that("bcat_plt_box works as violin plot", {
  p <- bcat_plt_box(mtcars, x = factor(cyl), y = mpg, violin = TRUE)
  expect_true(inherits(p, "ggplot"))
})

test_that("bcat_plt_box works with coord_flip", {
  p <- bcat_plt_box(mtcars, x = factor(cyl), y = mpg, coord_flip = TRUE)
  expect_true(inherits(p, "ggplot"))
})

Try the Rbearcat package in your browser

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

Rbearcat documentation built on March 21, 2026, 5:07 p.m.