tests/testthat/test-jdenticon.R

skip_on_cran()

test_that("jdenticon is created as expected", {
  j <- jdenticon(value = 1, preview = FALSE)
  expect_type(j, "character")
  expect_equal(basename(j), "jdenticon_100_1.png")


})

test_that("default name is created as expected", {
  j <- jdenticon(value = "test", size = 123)

  expect_equal(basename(j), "jdenticon_123_test.png")

})

Try the jdenticon package in your browser

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

jdenticon documentation built on April 25, 2023, 1:10 a.m.