tests/testthat/test-mlb_awards.R

cols <- c(
  "award_id", "award_name", "award_description", "sort_order",
  "notes", "sport_id", "sport_link", "league_id", "league_link"
)

test_that("MLB Awards", {
  skip_mlb_test()
  skip_on_cran()
  
  x <- mlb_awards()
  
  expect_in(sort(cols), sort(colnames(x)))
  expect_s3_class(x, "data.frame")
})

Try the baseballr package in your browser

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

baseballr documentation built on Aug. 27, 2026, 1:07 a.m.