Running ‘testthat.R’ [6s/58s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(geonuts)
  > 
  > test_check("geonuts")
  Saving _problems/test-get_nuts-44.R
  Saving _problems/test-get_nuts-63.R
  Saving _problems/test-get_nuts-83.R
  Saving _problems/test-map_nuts-41.R
  Saving _problems/test-map_nuts-53.R
  Saving _problems/test-map_nuts-65.R
  Saving _problems/test-map_nuts-77.R
  Saving _problems/test-map_nuts-95.R
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 4 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-get_nuts.R:39:3'): get_nuts() returns expected structure for single level ──
  Error in `UseMethod("st_make_valid")`: no applicable method for 'st_make_valid' applied to an object of class "NULL"
  Backtrace:
      ▆
   1. └─geonuts::get_nuts(...) at test-get_nuts.R:39:3
   2.   └─geonuts (local) .match_level(as.integer(level))
   3.     ├─base::suppressWarnings(sf::st_make_valid(shp))
   4.     │ └─base::withCallingHandlers(...)
   5.     └─sf::st_make_valid(shp)
  ── Error ('test-get_nuts.R:58:3'): get_nuts(level = 'all') returns all levels and metadata ──
  Error in `UseMethod("st_make_valid")`: no applicable method for 'st_make_valid' applied to an object of class "NULL"
  Backtrace:
      ▆
   1. └─geonuts::get_nuts(...) at test-get_nuts.R:58:3
   2.   └─geonuts (local) .match_level(0)
   3.     ├─base::suppressWarnings(sf::st_make_valid(shp))
   4.     │ └─base::withCallingHandlers(...)
   5.     └─sf::st_make_valid(shp)
  ── Error ('test-get_nuts.R:76:3'): get_nuts(match_strategy = 'nearest') assigns nearest region over water ──
  Error in `UseMethod("st_make_valid")`: no applicable method for 'st_make_valid' applied to an object of class "NULL"
  Backtrace:
      ▆
   1. └─geonuts::get_nuts(...) at test-get_nuts.R:76:3
   2.   └─geonuts (local) .match_level(as.integer(level))
   3.     ├─base::suppressWarnings(sf::st_make_valid(shp))
   4.     │ └─base::withCallingHandlers(...)
   5.     └─sf::st_make_valid(shp)
  ── Error ('test-map_nuts.R:36:3'): map_nuts() returns a ggplot object for single level results ──
  Error in `UseMethod("st_make_valid")`: no applicable method for 'st_make_valid' applied to an object of class "NULL"
  Backtrace:
      ▆
   1. └─geonuts::get_nuts(...) at test-map_nuts.R:36:3
   2.   └─geonuts (local) .match_level(as.integer(level))
   3.     ├─base::suppressWarnings(sf::st_make_valid(shp))
   4.     │ └─base::withCallingHandlers(...)
   5.     └─sf::st_make_valid(shp)
  ── Error ('test-map_nuts.R:48:3'): map_nuts() works with level = 'all' outputs ──
  Error in `UseMethod("st_make_valid")`: no applicable method for 'st_make_valid' applied to an object of class "NULL"
  Backtrace:
      ▆
   1. └─geonuts::get_nuts(...) at test-map_nuts.R:48:3
   2.   └─geonuts (local) .match_level(0)
   3.     ├─base::suppressWarnings(sf::st_make_valid(shp))
   4.     │ └─base::withCallingHandlers(...)
   5.     └─sf::st_make_valid(shp)
  ── Error ('test-map_nuts.R:60:3'): map_nuts() correctly filters by country code ──
  Error in `UseMethod("st_make_valid")`: no applicable method for 'st_make_valid' applied to an object of class "NULL"
  Backtrace:
      ▆
   1. └─geonuts::get_nuts(...) at test-map_nuts.R:60:3
   2.   └─geonuts (local) .match_level(as.integer(level))
   3.     ├─base::suppressWarnings(sf::st_make_valid(shp))
   4.     │ └─base::withCallingHandlers(...)
   5.     └─sf::st_make_valid(shp)
  ── Error ('test-map_nuts.R:72:3'): map_nuts() handles missing points gracefully ──
  Error in `UseMethod("st_make_valid")`: no applicable method for 'st_make_valid' applied to an object of class "NULL"
  Backtrace:
      ▆
   1. └─geonuts::get_nuts(...) at test-map_nuts.R:72:3
   2.   └─geonuts (local) .match_level(as.integer(level))
   3.     ├─base::suppressWarnings(sf::st_make_valid(shp))
   4.     │ └─base::withCallingHandlers(...)
   5.     └─sf::st_make_valid(shp)
  ── Error ('test-map_nuts.R:90:3'): map_nuts() throws informative errors for malformed input ──
  Error in `UseMethod("st_make_valid")`: no applicable method for 'st_make_valid' applied to an object of class "NULL"
  Backtrace:
      ▆
   1. └─geonuts::get_nuts(...) at test-map_nuts.R:90:3
   2.   └─geonuts (local) .match_level(as.integer(level))
   3.     ├─base::suppressWarnings(sf::st_make_valid(shp))
   4.     │ └─base::withCallingHandlers(...)
   5.     └─sf::st_make_valid(shp)
  
  [ FAIL 8 | WARN 0 | SKIP 0 | PASS 4 ]
  Error:
  ! Test failures.
  Execution halted