tests/testthat/test-get_all_countries.R

library(testthat)
library(dtmapi)

test_that("get_all_countries works", {
  skip_on_cran()  # Skip test on CRAN

  # Check if the function returns a data frame
  countries_df <- get_all_countries()
  expect_s3_class(countries_df, "data.frame")
  expect_true(nrow(countries_df) > 0)
})

Try the dtmapi package in your browser

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

dtmapi documentation built on June 23, 2025, 5:08 p.m.