tests/testthat/test.geom_dotsinterval.R

# Tests for dots geoms and stats
#
# Author: mjskay
###############################################################################

library(dplyr)



test_that("vanilla dots geoms and stats work", {
  skip_if_no_vdiffr()


  set.seed(1234)
  p = tribble(
    ~dist,  ~x,
    "norm", rnorm(20),
    "t",    rt(20, 3)
  ) %>%
    unnest(x) %>%
    ggplot()

  expect_warning(vdiffr::expect_doppelganger("vanilla geom_dotsh",
    p + geom_dotsh(aes(y = dist, x = x))
  ), "Deprecated")

  expect_warning(vdiffr::expect_doppelganger("stat_dotsh with a group with 1 dot",
    p + stat_dotsh(aes(y = dist, x = x, color = x > 2))
  ), "Deprecated")
})

Try the tidybayes package in your browser

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

tidybayes documentation built on Sept. 15, 2024, 9:08 a.m.