Running ‘testthat.R’ [2s/5s]
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: unallowed token at this point in JSON text
                                         ,{}Search engine returned inval
                       (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: capture_messages(object)
  3: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  4: ia_keyword_search("isaac hecker")
  5: content(req, as = "parsed", encoding = "UTF-8")
  6: parse_auto(raw, type, encoding, ...)
  7: parser(x = content, type = type, encoding = encoding, ...)
  8: jsonlite::fromJSON(parse_text(x, encoding = "UTF-8"), simplifyVector = simplifyVector, 
         ...)
  9: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  10: parseJSON(txt, bigint_as_char)
  11: parse_string(txt, bigint_as_char)
  
  2. Error: advanced search works (@test-search.R#11) ----------------------------
  parse error: unallowed token at this point in JSON text
                                         ,{}Search engine returned inval
                       (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: capture_messages(object)
  3: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  4: ia_search(c(creator = "herman melville"), num_results = 10)
  5: content(req, as = "parsed", encoding = "UTF-8")
  6: parse_auto(raw, type, encoding, ...)
  7: parser(x = content, type = type, encoding = encoding, ...)
  8: jsonlite::fromJSON(parse_text(x, encoding = "UTF-8"), simplifyVector = simplifyVector, 
         ...)
  9: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  10: parseJSON(txt, bigint_as_char)
  11: 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