Running ‘testthat.R’ [1s/22s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rbcb)
  > 
  > test_check("rbcb")
  ── 1. Failure: it should get series json (@test-get_series.R#6)  ───────────────
  jsonlite::validate(x) isn't true.
  
  ── 2. Failure: it should get series json (@test-get_series.R#7)  ───────────────
  `x` not equal to "[{\"data\":\"01/03/2017\",\"valor\":\"3.0976\"}]".
  1/1 mismatches
  x[1]: "<p>iisnode encountered an error when processing the request.</p><pre styl
  x[1]: e=\"background-color: eeeeee\">HRESULT: 0x6d\nHTTP status: 500\nHTTP subSt
  x[1]: atus: 1013\nHTTP reason: Internal Server Error</pre><p>You are receiving t
  x[1]: his HTTP 200 response because <a href=https://github.com/tjanczuk/iisnode/
  x[1]: blob/master/src/samples/configuration/web.config>system.webServer/iisno...
  y[1]: "[{\"data\":\"01/03/2017\",\"valor\":\"3.0976\"}]"
  
  ── 3. Error: it should get one series as data.frame (@test-get_series.R#11)  ───
  lexical error: invalid char in json text.
                                         <p>iisnode encountered an error
                       (right here) ------^
  1: get_series(1, last = 10) at testthat/test-get_series.R:11
  2: jsonlite::fromJSON(json_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  ── 4. Error: it should name the series (@test-get_series.R#22)  ────────────────
  lexical error: invalid char in json text.
                                         <p>iisnode encountered an error
                       (right here) ------^
  1: get_series(1, last = 10, name = "USD") at testthat/test-get_series.R:22
  2: jsonlite::fromJSON(json_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  ── 5. Error: it should get series as xts (@test-get_series.R#27)  ──────────────
  lexical error: invalid char in json text.
                                         <p>iisnode encountered an error
                       (right here) ------^
  1: get_series(1, last = 10, name = "USD", as = "xts") at testthat/test-get_series.R:27
  2: jsonlite::fromJSON(json_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  ── 6. Error: it should get series as ts (@test-get_series.R#32)  ───────────────
  lexical error: invalid char in json text.
                                         <p>iisnode encountered an error
                       (right here) ------^
  1: get_series(433, start_date = as.Date("2017-01-01"), name = "IPCA", as = "ts", ts_options = list(start = c(2017, 
         1), frequency = 12)) at testthat/test-get_series.R:32
  2: jsonlite::fromJSON(json_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  ── 7. Error: it should get series within a date period (@test-get_series.R#39)  
  lexical error: invalid char in json text.
                                         <p>iisnode encountered an error
                       (right here) ------^
  1: get_series(1, start_date = "2017-03-01", end_date = "2017-03-29", name = "USD") at testthat/test-get_series.R:39
  2: jsonlite::fromJSON(json_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  ── 8. Error: it should get series within a date period specifying only start_dat
  lexical error: invalid char in json text.
                                         <p>iisnode encountered an error
                       (right here) ------^
  1: get_series(1, start_date = start, name = "USD") at testthat/test-get_series.R:47
  2: jsonlite::fromJSON(json_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  ── 9. Error: it should get series within a date period specifying only end_date 
  lexical error: invalid char in json text.
                                         <p>iisnode encountered an error
                       (right here) ------^
  1: get_series(1, end_date = end, name = "USD") at testthat/test-get_series.R:54
  2: jsonlite::fromJSON(json_)
  3: fromJSON_string(txt = txt, simplifyVector = simplifyVector, simplifyDataFrame = simplifyDataFrame, 
         simplifyMatrix = simplifyMatrix, flatten = flatten, ...)
  4: parseJSON(txt, bigint_as_char)
  5: parse_string(txt, bigint_as_char)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 15 SKIPPED: 0 FAILED: 9
  1. Failure: it should get series json (@test-get_series.R#6) 
  2. Failure: it should get series json (@test-get_series.R#7) 
  3. Error: it should get one series as data.frame (@test-get_series.R#11) 
  4. Error: it should name the series (@test-get_series.R#22) 
  5. Error: it should get series as xts (@test-get_series.R#27) 
  6. Error: it should get series as ts (@test-get_series.R#32) 
  7. Error: it should get series within a date period (@test-get_series.R#39) 
  8. Error: it should get series within a date period specifying only start_date (@test-get_series.R#47) 
  9. Error: it should get series within a date period specifying only end_date (@test-get_series.R#54) 
  
  Error: testthat unit tests failed
  Execution halted