tests/testthat/test-quick_plots.R

set.seed(1234)

test_that("quick plots render correctly", {
  expect_doppelganger("ggdag_m_bias() is an M", ggdag_m_bias())
  expect_doppelganger("ggdag_butterfly_bias() is a butterfly", ggdag_butterfly_bias())
  expect_doppelganger("ggdag_confounder_triangle() is triangle", ggdag_confounder_triangle())
  expect_doppelganger("ggdag_collider_triangle() is triangle, too", ggdag_collider_triangle())
})

Try the ggdag package in your browser

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

ggdag documentation built on Sept. 11, 2024, 6:12 p.m.