tests/testthat/test-mlb_probables.R

cols <- c(
  "game_pk", "game_date", "fullName",
  "id", "team", "team_id", "home_plate_full_name", "home_plate_id"
)

test_that("MLB Probables", {
  skip_on_cran()
  
  x <- mlb_probables(game_pk = 566001)
  
  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.