Running ‘testthat.R’ [13s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(spatialrisk)
  > 
  > test_check("spatialrisk")
  Saving _problems/test_map_points-32.R
  Saving _problems/test_map_points-33.R
  Saving _problems/test_map_points-34.R
  Saving _problems/test_map_points-35.R
  Saving _problems/test_map_points-36.R
  Saving _problems/test_map_points-37.R
  [ FAIL 6 | WARN 0 | SKIP 7 | PASS 175 ]
  
  ══ Skipped tests (7) ═══════════════════════════════════════════════════════════
  • {mapview} is not installed (4): 'test-concentration-hotspot-indexed.R:202:3',
    'test_map_points.R:5:3', 'test_map_points.R:17:3', 'test_map_points.R:41:3'
  • {tmap} is not installed (3): 'test_choropleth.R:17:3',
    'test_choropleth.R:26:3', 'test_choropleth.R:38:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test_map_points.R:32:3'): map_points validates inputs ─────────────
  `map_points(df, value = "missing")` threw an error with unexpected message.
  Expected match: "not found"
  Actual message: "mapview is needed for this function to work. Install it via install.packages(\"mapview\")"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(map_points(df, value = "missing"), "not found") at test_map_points.R:32:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─spatialrisk::map_points(df, value = "missing")
  ── Failure ('test_map_points.R:33:3'): map_points validates inputs ─────────────
  `map_points(df, lon = "missing")` threw an error with unexpected message.
  Expected match: "not found"
  Actual message: "mapview is needed for this function to work. Install it via install.packages(\"mapview\")"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(map_points(df, lon = "missing"), "not found") at test_map_points.R:33:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─spatialrisk::map_points(df, lon = "missing")
  ── Failure ('test_map_points.R:34:3'): map_points validates inputs ─────────────
  `map_points(transform(df, lon = as.character(lon)))` threw an error with unexpected message.
  Expected match: "numeric"
  Actual message: "mapview is needed for this function to work. Install it via install.packages(\"mapview\")"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test_map_points.R:34:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─spatialrisk::map_points(transform(df, lon = as.character(lon)))
  ── Failure ('test_map_points.R:35:3'): map_points validates inputs ─────────────
  `map_points(df, crs = NA_real_)` threw an error with unexpected message.
  Expected match: "EPSG"
  Actual message: "mapview is needed for this function to work. Install it via install.packages(\"mapview\")"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(map_points(df, crs = NA_real_), "EPSG") at test_map_points.R:35:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─spatialrisk::map_points(df, crs = NA_real_)
  ── Failure ('test_map_points.R:36:3'): map_points validates inputs ─────────────
  `map_points(df, at = "high")` threw an error with unexpected message.
  Expected match: "numeric"
  Actual message: "mapview is needed for this function to work. Install it via install.packages(\"mapview\")"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(map_points(df, at = "high"), "numeric") at test_map_points.R:36:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─spatialrisk::map_points(df, at = "high")
  ── Failure ('test_map_points.R:37:3'): map_points validates inputs ─────────────
  `map_points(df, value = c("amount", "amount"))` threw an error with unexpected message.
  Expected match: "single"
  Actual message: "mapview is needed for this function to work. Install it via install.packages(\"mapview\")"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test_map_points.R:37:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─spatialrisk::map_points(df, value = c("amount", "amount"))
  
  [ FAIL 6 | WARN 0 | SKIP 7 | PASS 175 ]
  Error:
  ! Test failures.
  Execution halted