tests/testthat/test_glossary.R

test_that("Glossary is retrieved succesfully", {
  expect_s3_class({
    result <- cms_glossary()
    if (nrow(result) < 2) stop("Returned insufficient rows")
    result
  }, "data.frame")
})

test_that("Glossary can be filtered", {
  expect_true({
    result <- cms_glossary("Variable")
    nrow(result) == 1
  })
})

Try the CopernicusMarine package in your browser

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

CopernicusMarine documentation built on July 5, 2026, 5:06 p.m.