tests/testthat/test-add_path.R

test_that("can find least common parents between selected nodes", {
  graph <- graph_builder() |>
    add_path(c("A", "B", "C")) |>
    build_directed()

  expect_equal(
    as.character(find_path(graph, "A", "C")),
    c("A", "B", "C")
  )
})

Try the orbweaver package in your browser

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

orbweaver documentation built on June 8, 2025, 11:40 a.m.