tests/testthat/test_travel_time.R

library(testthat)

# vcr_configure(dir = tempdir(), log = TRUE, log_opts = list(file = "console"))


test_that("get_travel_time returns an `int`", {
  vcr::use_cassette("get_travel_time", {
    res <- get_travel_time(coords[1], coords[2])
  }, match_requests_on = c("query"))
  expect_type(res, "integer")
})
andodet/citymappR documentation built on Oct. 18, 2021, 6:11 p.m.