Running ‘testthat.R’ [16s/23s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(covid19br)
  > 
  > test_check("covid19br")
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_covid19br.R:16:1'): (code run outside of `test_that()`) ────────
  Error in `if (level == "cities") {
      data <- data %>% filter(!is.na(.data$pop))
  }`: argument is of length zero
  Backtrace:
      ▆
   1. ├─regions %>% filter(date == max(date)) %>% add_geo() %>% ... at test_covid19br.R:16:1
   2. ├─covid19br::add_epi_rates(.)
   3. │ └─base::nrow(data)
   4. └─covid19br::add_geo(.)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted
Running ‘testthat.R’ [40s/102s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(covid19br)
  > 
  > test_check("covid19br")
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_covid19br.R:16:1'): (code run outside of `test_that()`) ────────
  Error in `if (level == "cities") {
      data <- data %>% filter(!is.na(.data$pop))
  }`: argument is of length zero
  Backtrace:
      ▆
   1. ├─regions %>% filter(date == max(date)) %>% add_geo() %>% ... at test_covid19br.R:16:1
   2. ├─covid19br::add_epi_rates(.)
   3. │ └─base::nrow(data)
   4. └─covid19br::add_geo(.)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted
Running ‘testthat.R’ [40s/64s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(covid19br)
  > 
  > test_check("covid19br")
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_covid19br.R:16:1'): (code run outside of `test_that()`) ────────
  Error in `if (level == "cities") {
      data <- data %>% filter(!is.na(.data$pop))
  }`: argument is of length zero
  Backtrace:
      ▆
   1. ├─regions %>% filter(date == max(date)) %>% add_geo() %>% ... at test_covid19br.R:16:1
   2. ├─covid19br::add_epi_rates(.)
   3. │ └─base::nrow(data)
   4. └─covid19br::add_geo(.)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted