Running ‘testthat.R’ [2s/151s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(internetarchive)
  > 
  > test_check("internetarchive")
  ── 1. Error: keyword search works (@test-search.R#4)  ──────────────────────────
  parse error: trailing garbage
            esponse from Elasticsearch"  forensics: {"timestamp":"2018-1
                       (right here) ------^
  1: expect_message(keyword <- ia_keyword_search("isaac hecker"), "\\d+ total items found. This query requested 5 results.") at testthat/test-search.R:4
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: ia_keyword_search("isaac hecker")
  7: content(req, as = "parsed", encoding = "UTF-8")
  8: parse_auto(raw, type, encoding, ...)
  9: parser(x = content, type = type, encoding = encoding, ...)
  10: jsonlite::fromJSON(parse_text(x, encoding = "UTF-8"), simplifyVector = simplifyVector, 
         ...)
  11: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  12: parseJSON(txt, bigint_as_char)
  13: parse_string(txt, bigint_as_char)
  
  ── 2. Error: advanced search works (@test-search.R#11)  ────────────────────────
  parse error: trailing garbage
            esponse from Elasticsearch"  forensics: {"timestamp":"2018-1
                       (right here) ------^
  1: expect_message(advanced <- ia_search(c(creator = "herman melville"), num_results = 10), 
         "\\d+ total items found. This query requested 10 results.") at testthat/test-search.R:11
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: ia_search(c(creator = "herman melville"), num_results = 10)
  7: content(req, as = "parsed", encoding = "UTF-8")
  8: parse_auto(raw, type, encoding, ...)
  9: parser(x = content, type = type, encoding = encoding, ...)
  10: jsonlite::fromJSON(parse_text(x, encoding = "UTF-8"), simplifyVector = simplifyVector, 
         ...)
  11: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  12: parseJSON(txt, bigint_as_char)
  13: parse_string(txt, bigint_as_char)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 12 SKIPPED: 2 FAILED: 2
  1. Error: keyword search works (@test-search.R#4) 
  2. Error: advanced search works (@test-search.R#11) 
  
  Error: testthat unit tests failed
  Execution halted