tests/testthat/test-nhl_game_shifts.R

test_that("NHL - Get NHL Game Shifts", {
  skip_on_cran()
  x <- nhl_game_shifts(game_id=2021020182)
  
  cols <- c("event_team",
            "period",
            "period_time",
            "period_seconds",
            "game_seconds",
            "num_on",
            "players_on",
            "num_off",
            "players_off",
            "event",
            "event_type",
            "game_seconds_remaining")
  
  expect_equal(colnames(x), cols)
  expect_s3_class(x, 'data.frame')
  
})

Try the fastRhockey package in your browser

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

fastRhockey documentation built on Oct. 26, 2022, 1:09 a.m.