tests/testthat/test-autoplot.R

test_that("autoplot works", {
  skip_on_cran()
  skip_if_not_installed("ggplot2")
  skip_if_not_installed("tidyr")
  skip_if_not_installed("ggbeeswarm")
  y <- mark(x = 1:1000)
  expect_s3_class(ggplot2::autoplot(y), "ggplot")
  expect_s3_class(plot(y), "ggplot")
})

Try the bench package in your browser

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

bench documentation built on April 3, 2025, 6:16 p.m.