tests/testthat/test-team_edge_shot_speed.R

# Tests ---------------------------------------------------------

testthat::test_that('team_edge_shot_speed() returns non-empty data.frame', {
  testthat::skip_if_offline()
  test <- team_edge_shot_speed()
  testthat::expect_true(is.data.frame(test) && nrow(test) > 0)
})

# Run team edge shot speed tests.
testthat::test_that('team_edge_shot_speed(0) returns message and empty data.frame', {
  testthat::skip_if_offline()
  testthat::expect_message(
    test <- team_edge_shot_speed(0),
    'Invalid argument\\(s\\); refer to help file\\.'
  )
  testthat::expect_true(is.data.frame(test) && nrow(test) == 0)
})

Try the nhlscraper package in your browser

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

nhlscraper documentation built on June 29, 2026, 1:06 a.m.