Skip to content

Commit

Permalink
Add test for states + tests for metro areas
Browse files Browse the repository at this point in the history
  • Loading branch information
elipousson committed Mar 12, 2024
1 parent 6b6b0a8 commit 7c142d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/testthat/test-metro_areas.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
test_that("metro areas functions work", {
withr::local_options(list(tigris_use_cache = TRUE))

expect_s3_class(core_based_statistical_areas(), "sf")

expect_s3_class(urban_areas(), "sf")

# expect_s3_class(combined_statistical_areas(), "sf")

expect_s3_class(metro_divisions(year = 2019), "sf")

expect_s3_class(new_england(year = 2019), "sf")

})
1 change: 1 addition & 0 deletions tests/testthat/test-states.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ test_that("states works", {
# expect_s3_class(states(year = 2013, cb = TRUE), "sf")

# expect_s3_class(states(year = 2010), "sf")
expect_s3_class(states(year = 2012), "sf")
expect_s3_class(states(), "sf")
})

0 comments on commit 7c142d9

Please sign in to comment.