Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(coinmarketcapr)
  > 
  > test_check("coinmarketcapr")
  ── 1. Error: The output dataframe Type is  (@test-fun.R#7)  ────────────────────
  lexical error: invalid char in json text.
                                         <!DOCTYPE html> <!--[if lt IE 7
                       (right here) ------^
  1: expect_equal(class(get_global_marketcap("USD")), "data.frame") at testthat/test-fun.R:7
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_global_marketcap("USD")
  5: data.frame(fromJSON(rawToChar(curl_fetch_memory(paste0("https://api.coinmarketcap.com/v1/global/?convert=", 
         currency))$content)))
  6: fromJSON(rawToChar(curl_fetch_memory(paste0("https://api.coinmarketcap.com/v1/global/?convert=", 
         currency))$content))
  7: parse_and_simplify(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: The output dataframe Type is  (@test-fun.R#14)  ───────────────────
  lexical error: invalid char in json text.
                                         <!DOCTYPE html> <!--[if lt IE 7
                       (right here) ------^
  1: expect_equal(class(get_marketcap_ticker_all("USD")), "data.frame") at testthat/test-fun.R:14
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: get_marketcap_ticker_all("USD")
  5: data.frame(fromJSON(rawToChar(curl_fetch_memory(paste0("https://api.coinmarketcap.com/v1/ticker/?convert=", 
         currency, "&limit=0"))$content)))
  6: fromJSON(rawToChar(curl_fetch_memory(paste0("https://api.coinmarketcap.com/v1/ticker/?convert=", 
         currency, "&limit=0"))$content))
  7: parse_and_simplify(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  8: parseJSON(txt, bigint_as_char)
  9: parse_string(txt, bigint_as_char)
  
  ── 3. Error: The output ggplot Type is  (@test-fun.R#22)  ──────────────────────
  lexical error: invalid char in json text.
                                         <!DOCTYPE html> <!--[if lt IE 7
                       (right here) ------^
  1: expect_true(is.ggplot(plot_top_currencies("USD"))) at testthat/test-fun.R:22
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: is.ggplot(plot_top_currencies("USD"))
  5: plot_top_currencies("USD")
  6: data.frame(fromJSON(rawToChar(curl_fetch_memory(paste0("https://api.coinmarketcap.com/v1/ticker/?convert=", 
         currency))$content)))
  7: fromJSON(rawToChar(curl_fetch_memory(paste0("https://api.coinmarketcap.com/v1/ticker/?convert=", 
         currency))$content))
  8: parse_and_simplify(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  9: parseJSON(txt, bigint_as_char)
  10: parse_string(txt, bigint_as_char)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 0 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 3 ]
  1. Error: The output dataframe Type is  (@test-fun.R#7) 
  2. Error: The output dataframe Type is  (@test-fun.R#14) 
  3. Error: The output ggplot Type is  (@test-fun.R#22) 
  
  Error: testthat unit tests failed
  Execution halted