tests/testthat/test-geom-errorbar.R

test_that("geom_errorbarh throws deprecation messages", {

  lifecycle::expect_deprecated(geom_errorbarh())

  p <- ggplot(
    data.frame(y = "A", min = 0, max = 10),
    aes(y = y, xmin = min, xmax = max)
  ) +
    layer(
      geom = "errorbarh",
      stat = "identity",
      position = "identity"
    )

  lifecycle::expect_deprecated(ggplot_build(p))
})
hadley/ggplot2 documentation built on June 13, 2025, 12:51 a.m.