tests/testthat/test-rotowire_injuries.R

test_that("RotoWire - NBA Injuries", {
  skip_on_cran()
  skip_on_ci()

  x <- rotowire_injuries()
  if (!is.data.frame(x) || nrow(x) == 0) skip("No RotoWire injuries returned at test time")

  cols <- c("player_id", "player", "team", "position", "injury", "status", "url")
  expect_in(sort(cols), sort(colnames(x)))
  expect_s3_class(x, "data.frame")
  expect_true(all(grepl("^https://www.rotowire.com", stats::na.omit(x$url))))

  Sys.sleep(2)
})

Try the hoopR package in your browser

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

hoopR documentation built on Aug. 25, 2026, 9:07 a.m.