tests/testthat/test-percentages.R

test_that("stats", {
  
  a <- list(A = 1:5, B = 1:2)
  
  expect_snapshot(
    normalize_ggvenn_output(
      ggvenn(a, show_percentage = FALSE)
    )
  )
  
  expect_snapshot(
    normalize_ggvenn_output(
      ggvenn(a, show_percentage = TRUE)
    )
  )
  
  expect_snapshot(
    normalize_ggvenn_output(
      ggvenn(a, show_percentage = TRUE, digits = 2)
    )
  )
})

Try the ggvenn package in your browser

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

ggvenn documentation built on Nov. 5, 2025, 7:44 p.m.