tests/testthat/test-theme.R

test_that("theme_infomap returns a ggplot2 theme object and handles invalid fonts", {
  expect_s3_class(theme_infomap(), "theme")
  expect_s3_class(theme_infomap(font = "Anton"), "theme")
  expect_s3_class(theme_infomap_anton(), "theme")
  expect_s3_class(theme_infomap_poppins(), "theme")
  expect_s3_class(theme_infomap_barlow(), "theme")
})

test_that("theme_poster returns a ggplot2 theme object and handles invalid fonts", {
  expect_s3_class(theme_poster(), "theme")
  expect_s3_class(theme_poster(font = "Anton"), "theme")
  expect_s3_class(theme_poster_anton(), "theme")
  expect_s3_class(theme_poster_poppins(), "theme")
})

Try the cartographr package in your browser

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

cartographr documentation built on Aug. 21, 2025, 5:46 p.m.