tests/testthat/test-ctg_count.R

library(testthat)

test_that("ctg_count works correctly", {
  skip_on_cran()  # Skip this test on CRAN since it involves an API call

  result <- ctg_count(
    condition = "Glioblastoma",
    location = "India",
    title = NULL,
    intervention = "Drug",
    status = NULL
  )

  expect_type(result, "double")
  expect_true(result >= 0)  # Expect a non-negative double
})

Try the clintrialx package in your browser

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

clintrialx documentation built on April 3, 2025, 6:47 p.m.