Skip to content

Commit

Permalink
adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Jan 31, 2025
1 parent e591cb8 commit af34d15
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/testthat/test-plot_by_subject.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ test_that("top views created correctly via purrr::map", {
test_that("top views wrangled correctly via tidyverse", {
expect_match(top_all_plots$plot_type[[1]], "paths")
expect_match(top_all_plots$subject[[5]], "device03")
expect_match(top_all_plots[[3]][[4]][["labels"]][["x"]], "position_width")
labels <- if ("get_labs" %in% getNamespaceExports("ggplot2")) {
ggplot2::get_labs(top_all_plots[[3]][[4]])
} else {
top_all_plots[[3]][[4]][["labels"]]
}
expect_match(labels[["x"]], "position_width")
})

#test that plotting works?
Expand Down Expand Up @@ -165,7 +170,12 @@ test_that("elev views created correctly via purrr::map", {
test_that("elev views wrangled correctly via tidyverse", {
expect_match(elev_all_plots$plot_type[[3]], "paths")
expect_match(elev_all_plots$subject[[4]], "device02")
expect_match(elev_all_plots[[3]][[4]][["labels"]][["x"]], "position_height")
labels <- if ("get_labs" %in% getNamespaceExports("ggplot2")) {
ggplot2::get_labs(elev_all_plots[[3]][[4]])
} else {
elev_all_plots[[3]][[4]][["labels"]]
}
expect_match(labels[["x"]], "position_height")
})

## Test that plotting works?
Expand Down

0 comments on commit af34d15

Please sign in to comment.