tests/testthat/test-mlb_roster_types.R

cols <- c(
  "roster_type_description", "roster_type_lookup_name", 
  "roster_type_parameter"
)

test_that("MLB Roster Types", {
  skip_on_cran()
  
  x <- mlb_roster_types()
  
  expect_equal(colnames(x), cols)
  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 April 1, 2023, 12:12 a.m.