Running ‘testthat.R’ [8s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(WHO)
  > 
  > test_check("WHO")
  1. Error: get_codes returns a data frame with positive length (@tests.R#11) ----
  parse error: premature EOF
                                         { "copyright": "(c) World Healt
                       (right here) ------^
  1: get_codes() at testthat/tests.R:11
  2: get_result(url)
  3: httr::content(response, "parsed")
  4: parse_auto(raw, type, encoding, ...)
  5: parser(x = content, type = type, encoding = encoding, ...)
  6: jsonlite::fromJSON(parse_text(x, encoding = "UTF-8"), simplifyVector = simplifyVector, 
         ...)
  7: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_string(txt, bigint_as_char)
  
  2. Error: get_codes(TRUE) returns a data frame with positive length and more
            than three columns (@tests.R#18) 
  parse error: premature EOF
                                         { "copyright": "(c) World Healt
                       (right here) ------^
  1: get_codes(TRUE) at testthat/tests.R:18
  2: get_result(url)
  3: httr::content(response, "parsed")
  4: parse_auto(raw, type, encoding, ...)
  5: parser(x = content, type = type, encoding = encoding, ...)
  6: jsonlite::fromJSON(parse_text(x, encoding = "UTF-8"), simplifyVector = simplifyVector, 
         ...)
  7: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_string(txt, bigint_as_char)
  
  testthat results ================================================================
  OK: 2 SKIPPED: 0 FAILED: 2
  1. Error: get_codes returns a data frame with positive length (@tests.R#11) 
  2. Error: get_codes(TRUE) returns a data frame with positive length and more
            than three columns (@tests.R#18) 
  
  Error: testthat unit tests failed
  Execution halted