Running ‘testthat.R’ [2s/538s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rbcb)
  > 
  > test_check("rbcb")
  ── 1. Error: it should get series json (@test-get_series.R#4)  ─────────────────
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(1, start_date = "2017-03-01", end_date = "2017-03-01", as = "text") at testthat/test-get_series.R:4
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  ── 2. Error: it should get one series as data.frame (@test-get_series.R#11)  ───
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(1, last = 10) at testthat/test-get_series.R:11
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  ── 3. Error: it should name the series (@test-get_series.R#22)  ────────────────
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1), last = 10) at testthat/test-get_series.R:22
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  ── 4. Error: it should get series as xts (@test-get_series.R#27)  ──────────────
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1), last = 10, as = "xts") at testthat/test-get_series.R:27
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  ── 5. Error: it should get series as ts (@test-get_series.R#32)  ───────────────
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(IPCA = 433), start_date = as.Date("2017-01-01"), as = "ts") at testthat/test-get_series.R:32
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  ── 6. Error: it should get series within a date period (@test-get_series.R#44)  
  'names' attribute [6] must be the same length as the vector [0]
  1: get_series(c(USD = 1), start_date = "2017-03-01", end_date = "2017-03-29") at testthat/test-get_series.R:44
  2: series_obj(code)
  3: lapply(ser, series_info)
  4: FUN(X[[i]], ...)
  5: setNames(info, c("code", "description", "unit", "frequency", "start_date", "last_date"))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 32 SKIPPED: 0 FAILED: 6
  1. Error: it should get series json (@test-get_series.R#4) 
  2. Error: it should get one series as data.frame (@test-get_series.R#11) 
  3. Error: it should name the series (@test-get_series.R#22) 
  4. Error: it should get series as xts (@test-get_series.R#27) 
  5. Error: it should get series as ts (@test-get_series.R#32) 
  6. Error: it should get series within a date period (@test-get_series.R#44) 
  
  Error: testthat unit tests failed
  Execution halted