tests/testthat/test-create_diagram.R

test_that("create diagrams", {
  expect_s3_class(
    nomnoml(""),
    "htmlwidget"
  )
  
  diagram <- "[Hallo] -> [World]"
  expect_equal(
    nomnoml(diagram)$x$code,
    paste(nomnoml:::nomnoml_defaults(), diagram, sep = "\n")
  )
})

Try the nomnoml package in your browser

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

nomnoml documentation built on Nov. 20, 2023, 5:09 p.m.