tests/testthat/test-espn_mbb_wp.R

test_that("ESPN - Get MBB Win Probability", {
  skip_on_cran()
  x <- espn_mbb_wp(game_id = 401256760)


  cols <- c(
    "game_id", "play_id", "period", "time_left",
    "period_seconds_left", "game_seconds_left",
    "home_win_percentage", "away_win_percentage", "tie_percentage"
  )
  expect_equal(colnames(x), cols)
  expect_s3_class(x, "data.frame")

})

Try the hoopR package in your browser

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

hoopR documentation built on Nov. 26, 2023, 1:07 a.m.