tests/testthat/test-sdg_icon.R

test_that("Return the icon information of a specified SDG", {
  output <- sdg_icon(x = 17, res = 300)

  output_check <- magick::image_info(output)

  expect_equal(
    output_check$format,
    expected = "PNG"
  )

  expect_equal(
    output_check$width,
    expected = 300
  )
})

Try the SDGdetector package in your browser

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

SDGdetector documentation built on May 31, 2023, 9:32 p.m.