tests/testthat/test-figasaur.R

context("figasaur")

test_that("recover plot code", {
  dest <- tempfile("testpng", fileext = ".png")
  figasaur(plot(sample(100)), dest)
  expect_match(decode(dest), "plot(sample(100))",
               fixed = TRUE)
})
richfitz/stegasaur documentation built on Feb. 12, 2021, 1:41 a.m.