tests/testthat/test-list_tables.R

test_that("Verify nomis list_table function", {
  table_list = list_tables()

  # Correct column names?
  expect_setequal(colnames(table_list), c("name", "id"))

  # Are IDs unique?
  expect_equal(length(unique(table_list$id)), length(table_list$id))

  # Is there data in the data frame?
  expect_gt(dim(table_list)[1], 0)
})

Try the sgapi package in your browser

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

sgapi documentation built on June 8, 2025, 11:09 a.m.