Running ‘testthat.R’ [15s/42s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(terrainr)
  > 
  > test_check("terrainr")
  Starting 2 test processes
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (19)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-2-get_tiles_3dep.R:64:3): specifying SR works ───────────────────
  Error: lexical error: invalid char in json text.
                                         <!DOCTYPE html PUBLIC "-//W3C//
                       (right here) ------^
  
  Backtrace:
       █
    1. ├─terrainr::get_tiles(dat)
    2. └─terrainr:::get_tiles.sf(dat)
    3.   └─terrainr:::get_tiles_internal(...)
    4.     └─terrainr::hit_national_map_api(...)
    5.       └─terrainr:::get_href()
    6.         └─base::tryCatch(...)
    7.           └─base:::tryCatchList(expr, classes, parentenv, handlers)
    8.             └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    9.               └─value[[3L]](cond)
   10.                 └─base::tryCatch(...)
   11.                   └─base:::tryCatchList(expr, classes, parentenv, handlers)
   12.                     └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   13.                       └─value[[3L]](cond)
   14.                         └─httr::content(res, type = "application/json")
   15.                           └─httr:::parse_auto(raw, type, encoding, ...)
   16.                             └─httr:::parser(...)
   17.                               └─jsonlite::fromJSON(...)
   18.                                 └─jsonlite:::parse_and_simplify(...)
   19.                                   └─jsonlite:::parseJSON(txt, bigint_as_char)
   20.                                     └─jsonlite:::parse_string(txt, bigint_as_char)
  ── Error (test-get_tiles.R:5:3): raster method is consistent ───────────────────
  Error: lexical error: invalid char in json text.
                                         <!DOCTYPE html PUBLIC "-//W3C//
                       (right here) ------^
  
  Backtrace:
       █
    1. ├─terrainr::get_tiles(tmp_raster, bboxSR = 4326, imageSR = 4326)
    2. └─terrainr:::get_tiles.Raster(tmp_raster, bboxSR = 4326, imageSR = 4326)
    3.   └─terrainr:::get_tiles_internal(...)
    4.     └─terrainr::hit_national_map_api(...)
    5.       └─terrainr:::get_href()
    6.         └─base::tryCatch(...)
    7.           └─base:::tryCatchList(expr, classes, parentenv, handlers)
    8.             └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
    9.               └─value[[3L]](cond)
   10.                 └─base::tryCatch(...)
   11.                   └─base:::tryCatchList(expr, classes, parentenv, handlers)
   12.                     └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   13.                       └─value[[3L]](cond)
   14.                         └─httr::content(res, type = "application/json")
   15.                           └─httr:::parse_auto(raw, type, encoding, ...)
   16.                             └─httr:::parser(...)
   17.                               └─jsonlite::fromJSON(...)
   18.                                 └─jsonlite:::parse_and_simplify(...)
   19.                                   └─jsonlite:::parseJSON(txt, bigint_as_char)
   20.                                     └─jsonlite:::parse_string(txt, bigint_as_char)
  
  [ FAIL 2 | WARN 0 | SKIP 19 | PASS 26 ]
  Error: Test failures
  Execution halted