tests/testthat/test-operator.R

test_that("%<+% reports a helpful error when data is missing", {
  p <- structure(list(), class = "ggtree")

  expect_error(
    `%<+%`(p),
    "Cannot use .*%<\\+%.* with a single argument"
  )
})

Try the ggfun package in your browser

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

ggfun documentation built on July 3, 2026, 1:08 a.m.