tests/testthat/test-bus-schedules.R

test_that("bus schedule returns for both directions", {
  skip_if_no_key()
  Sys.sleep(0.11)
  s <- bus_schedule("10A")
  expect_length(s, 10)
  expect_s3_class(s, "data.frame")
  expect_s3_class(s$EndTime, "POSIXct")
})

Try the metro package in your browser

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

metro documentation built on May 29, 2024, 8:32 a.m.