Running 'testthat.R' [63s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(terrainr)
  > 
  > test_check("terrainr")
  Starting 2 test processes
  [ FAIL 3 | WARN 21 | SKIP 17 | PASS 31 ]
  
  == Skipped tests ===============================================================
  * On CRAN (16)
  * On Windows (1)
  
  == Failed tests ================================================================
  -- Error (test-2-get_tiles_3dep.R:67:3): specifying SR works -------------------
  Error: lexical error: invalid char in json text.
                                         <!DOCTYPE html PUBLIC "-//W3C//
                       (right here) ------^
  
  Backtrace:
       x
    1. +-terrainr::get_tiles(dat) at test-2-get_tiles_3dep.R:67:2
    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(x = content, type = type, encoding = encoding, ...)
   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-4-merge_rasters.R:110:3): overwrite works as expected -----------
  Error: lexical error: invalid char in json text.
                                         <!DOCTYPE html PUBLIC "-//W3C//
                       (right here) ------^
  
  Backtrace:
       x
    1. +-terrainr::get_tiles(first_tile) at test-4-merge_rasters.R:110:2
    2. \-terrainr:::get_tiles.sfc(first_tile)
    3.   +-terrainr::get_tiles(...)
    4.   \-terrainr:::get_tiles.sf(...)
    5.     \-terrainr:::get_tiles_internal(...)
    6.       \-terrainr::hit_national_map_api(...)
    7.         \-terrainr get_href()
    8.           \-base::tryCatch(...)
    9.             \-base tryCatchList(expr, classes, parentenv, handlers)
   10.               \-base tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11.                 \-value[[3L]](cond)
   12.                   \-base::tryCatch(...)
   13.                     \-base tryCatchList(expr, classes, parentenv, handlers)
   14.                       \-base tryCatchOne(expr, names, parentenv, handlers[[1L]])
   15.                         \-value[[3L]](cond)
   16.                           \-httr::content(res, type = "application/json")
   17.                             \-httr:::parse_auto(raw, type, encoding, ...)
   18.                               \-httr parser(x = content, type = type, encoding = encoding, ...)
   19.                                 \-jsonlite::fromJSON(...)
   20.                                   \-jsonlite:::parse_and_simplify(...)
   21.                                     \-jsonlite:::parseJSON(txt, bigint_as_char)
   22.                                       \-jsonlite:::parse_string(txt, bigint_as_char)
  -- Error (test-get_tiles.R:5:3): SpatRast method is consistent -----------------
  Error: lexical error: invalid char in json text.
                                         <!DOCTYPE html PUBLIC "-//W3C//
                       (right here) ------^
  
  Backtrace:
       x
    1. +-terrainr::get_tiles(tmp_raster, bboxSR = 4326, imageSR = 4326) at test-get_tiles.R:5:2
    2. \-terrainr:::get_tiles.SpatRaster(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(x = content, type = type, encoding = encoding, ...)
   17.                               \-jsonlite::fromJSON(...)
   18.                                 \-jsonlite:::parse_and_simplify(...)
   19.                                   \-jsonlite:::parseJSON(txt, bigint_as_char)
   20.                                     \-jsonlite:::parse_string(txt, bigint_as_char)
  
  [ FAIL 3 | WARN 21 | SKIP 17 | PASS 31 ]
  Error: Test failures
  Execution halted