tests/testthat/test-mlb_conferences.R

cols <- c(
  "conference_id", "conference_name", "link", 
  "conference_abbreviation", "has_wildcard", "conference_name_short", 
  "league_id", "league_link", "sport_id", "sport_link"
)

test_that("MLB Conferences", {
  skip_on_cran()
  
  x <- mlb_conferences()
  
  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.