tests/testthat/test_instructions.R

context("route")

test_that("extract instructions", {
  # Prepare
  route <- readRDS("data/route-data.rds")

  # Act
  instructions <- gh_instructions(route, instructions_only = TRUE)

  # Assert
  expect_is(instructions, "data.frame")
  expect_true(all(c("gh_start_id", "gh_end_id", "text") %in% names(instructions)))
})

Try the graphhopper package in your browser

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

graphhopper documentation built on Feb. 6, 2021, 5:05 p.m.