tests/testthat/test-team_month_schedule.R

test_that('team_month_schedule(1, \'2025-01\') returns non-empty data.frame', {
  skip_if_offline()
  test <- team_month_schedule(1, '2025-01')
  expect_true(is.data.frame(test) && nrow(test) > 0)
})

test_that(
  'team_month_schedule(1, 202501) returns message and empty data.frame', {
  skip_if_offline()
  expect_message(
    test <- team_month_schedule(1, 202501),
    'Invalid argument\\(s\\); refer to help file\\.'
  )
  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 Dec. 17, 2025, 5:10 p.m.