Running ‘testthat.R’ [5s/49s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(crimedata)
  > 
  > test_check("crimedata")
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |========================================                              |  56%
    |                                                                            
    |======================================================================| 100%
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 30 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_get_crime_data.R:4:3): return value of get_crime_data is a tibble or SF object ──
  Error in `get_crime_data()`: The Crime Open Database does not contain data for any of the specified years for the specified cities.
  Backtrace:
      ▆
   1. ├─testthat::expect_is(get_crime_data(), "tbl_df") at test_get_crime_data.R:4:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─crimedata::get_crime_data()
  ── Error (test_get_crime_data.R:28:3): quiet execution does not return any messages ──
  Error in `get_crime_data(quiet = TRUE)`: The Crime Open Database does not contain data for any of the specified years for the specified cities.
  Backtrace:
      ▆
   1. ├─testthat::expect_message(get_crime_data(quiet = TRUE), NA) at test_get_crime_data.R:28:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_messages)
   3. │   ├─testthat .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─crimedata::get_crime_data(quiet = TRUE)
  ── Error (test_get_crime_data.R:34:3): data cache works as expected ────────────
  Error in `get_crime_data(cities = "Detroit")`: The Crime Open Database does not contain data for any of the specified years for the specified cities.
  Backtrace:
      ▆
   1. └─crimedata::get_crime_data(cities = "Detroit") at test_get_crime_data.R:34:2
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 30 ]
  Error: Test failures
  Execution halted