tests/testthat/test-espn_metrics_wp.R

cols <- c(
  "game_id", "play_id", "seconds_left",
  "home_win_percentage", "away_win_percentage", "tie_percentage"
)

test_that("CFB Metrics ESPN Win Probability", {
  skip_on_cran()
  x <- espn_metrics_wp(game_id = 401012356)
  expect_equal(colnames(x), cols)
  expect_s3_class(x, "data.frame")
})

Try the cfbfastR package in your browser

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

cfbfastR documentation built on June 14, 2022, 1:05 a.m.