Running ‘testthat.R’ [2s/225s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(nlgeocoder)
  > 
  > test_check("nlgeocoder")
  ── 1. Error: Dataframe returned (not an sf object) (@test-nl_geocode.R#41)  ────
  cannot open the connection to 'https://geodata.nationaalgeoregister.nl/locatieserver/v3/free?fq=type:adres&q=Martinikerkhof%203%20Groningen&rows=1'
  1: nl_geocode("Martinikerkhof 3 Groningen", output = "data.frame") at testthat/test-nl_geocode.R:41
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  ── 2. Error: return as wgs84 is working (@test-nl_geocode.R#46)  ───────────────
  cannot open the connection to 'https://geodata.nationaalgeoregister.nl/locatieserver/v3/free?fq=type:adres&q=Martinikerkhof%203%20Groningen&rows=1'
  1: nl_geocode("Martinikerkhof 3 Groningen", output = "wgs84") at testthat/test-nl_geocode.R:46
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  ── 3. Error: return as rd is working (@test-nl_geocode.R#51)  ──────────────────
  cannot open the connection to 'https://geodata.nationaalgeoregister.nl/locatieserver/v3/free?fq=type:adres&q=Martinikerkhof%203%20Groningen&rows=1'
  1: nl_geocode("Martinikerkhof 3 Groningen", output = "rd") at testthat/test-nl_geocode.R:51
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  ── 4. Error: restrict search to Groningen (@test-nl_geocode.R#61)  ─────────────
  cannot open the connection to 'https://geodata.nationaalgeoregister.nl/locatieserver/v3/free?fq=provincienaam:Groningen&q=Hoofdstraat&rows=1'
  1: nl_geocode("Hoofdstraat", fq = "provincienaam:Groningen") at testthat/test-nl_geocode.R:61
  2: lapply(as.character(location), function(loc) {
         res <- nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
         if (res$response$numFound) {
             res$response$docs[1, ]
         }
     })
  3: FUN(X[[i]], ...)
  4: nl_free(q = loc, type = type, ..., rows = 1, verbose = verbose)
  5: jsonlite::read_json(q_url, simplifyVector = TRUE)
  6: parse_json(file(path), simplifyVector = simplifyVector, ...)
  7: parse_and_simplify(json, simplifyVector = simplifyVector, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_con(txt, bigint_as_char)
  10: open(con, "rb")
  11: open.connection(con, "rb")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 3 | SKIPPED: 26 | WARNINGS: 4 | FAILED: 4 ]
  1. Error: Dataframe returned (not an sf object) (@test-nl_geocode.R#41) 
  2. Error: return as wgs84 is working (@test-nl_geocode.R#46) 
  3. Error: return as rd is working (@test-nl_geocode.R#51) 
  4. Error: restrict search to Groningen (@test-nl_geocode.R#61) 
  
  Error: testthat unit tests failed
  Execution halted