tests/testthat/test-print_util.R

tree <- list(A = c("a", "aa"),
             B = c("b", "bb", "bbb"),
             C = c("c", "cc", "ccc"),
             D = c("d", "dd"))

test_that("tree_string", {
  expect_silent(ts <- tree_string(tree, max = 10))
})

test_that("tree_string", {
  expect_silent(ts <- tree_string(tree, max = 2))
  expect_equal(ts, "A[2]->B[3]->... [2 omitted]")
})
gherardovarando/stagedtrees documentation built on July 5, 2025, 12:35 a.m.