tests/testthat/test-get_espn_events.R

test_that('get_espn_events() returns non-empty tibble', {
  skip_if_offline()
  test <- get_espn_events()
  expect_true(tibble::is_tibble(test) && nrow(test)>0)
})

test_that('get_espn_events(18000101, 19000101) returns empty tibble', {
  skip_if_offline()
  test <- get_espn_events(18000101, 19000101)
  expect_true(tibble::is_tibble(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 Aug. 8, 2025, 6:28 p.m.