From dd339809fe524348bae19e8c6849b643e3e0ef0a Mon Sep 17 00:00:00 2001 From: aleksanderbl29 <73799306+aleksanderbl29@users.noreply.github.com> Date: Sun, 22 Sep 2024 23:45:39 +0200 Subject: [PATCH] Add more testing for map data --- tests/testthat/_snaps/get_map_data.md | 4 ++++ tests/testthat/test-get_map_data.R | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 tests/testthat/_snaps/get_map_data.md create mode 100644 tests/testthat/test-get_map_data.R diff --git a/tests/testthat/_snaps/get_map_data.md b/tests/testthat/_snaps/get_map_data.md new file mode 100644 index 0000000..6237506 --- /dev/null +++ b/tests/testthat/_snaps/get_map_data.md @@ -0,0 +1,4 @@ +# Get map data errs correctly + + You have provided type `fisk` which is not compatible with this function. + diff --git a/tests/testthat/test-get_map_data.R b/tests/testthat/test-get_map_data.R new file mode 100644 index 0000000..b73bb24 --- /dev/null +++ b/tests/testthat/test-get_map_data.R @@ -0,0 +1,4 @@ +test_that("Get map data errs correctly", { + expect_snapshot_error(get_map_data("fisk")) + expect_error(get_map_data("fisk")) +})