Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(graphhopper)
  > 
  > test_check("graphhopper")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • gh_is_avialable() is not TRUE (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_gh-as-sf.R:8:3): route as sf linestring ─────────────────────────
  Error: there is no package called 'sf'
  Backtrace:
      █
   1. ├─graphhopper::gh_as_sf(route) test_gh-as-sf.R:8:2
   2. ├─graphhopper:::gh_as_sf.gh_route(route)
   3. │ └─as.matrix(coords_df) %>% sf::st_linestring() %>% sf::st_sfc(crs = 4326)
   4. └─base::loadNamespace(x)
   5.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6.     └─base:::withOneRestart(expr, restarts[[1L]])
   7.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test_gh-as-sf.R:20:3): spt as sf points ──────────────────────────────
  Error: there is no package called 'sf'
  Backtrace:
      █
   1. ├─graphhopper::gh_as_sf(spt) test_gh-as-sf.R:20:2
   2. ├─graphhopper:::gh_as_sf.gh_spt(spt)
   3. │ └─data %>% sf::st_as_sf(coords = c("longitude", "latitude"), crs = 4326)
   4. └─base::loadNamespace(x)
   5.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6.     └─base:::withOneRestart(expr, restarts[[1L]])
   7.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (???): sf LINESTRING ──────────────────────────────────────────────────
  Error: there is no package called 'sf'
  Backtrace:
      █
   1. ├─gh_get_route(list(start_point, end_point)) %>% gh_as_sf()
   2. ├─graphhopper::gh_as_sf(.)
   3. ├─graphhopper:::gh_as_sf.gh_route(.)
   4. │ └─as.matrix(coords_df) %>% sf::st_linestring() %>% sf::st_sfc(crs = 4326)
   5. └─base::loadNamespace(x)
   6.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7.     └─base:::withOneRestart(expr, restarts[[1L]])
   8.       └─base:::doWithOneRestart(return(expr), restart)
  
  [ FAIL 3 | WARN 0 | SKIP 2 | PASS 2 ]
  Error: Test failures
  Execution halted