tests/testthat/test-plot_league_dashboard.R

# Unit tests for the plot_league_dashboard function

# Test 1: Invalid league ID throws error
test_that("invalid league ID throws error", {
  expect_error(plot_league_dashboard(-777),
               "Dashboard generation halted due to invalid league ID.") # nolint
})

Try the sleeperapi package in your browser

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

sleeperapi documentation built on April 3, 2025, 6:13 p.m.