Skip to content

Commit

Permalink
Fix lintr issue in test file (already fixed in another branch)
Browse files Browse the repository at this point in the history
  • Loading branch information
francisbarton committed Aug 6, 2024
1 parent 0d1cd21 commit 54e7e0b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/testthat/test-ptd_create_ggplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,10 @@ test_that("it sets the colour of the points based on the type", {
stub(ptd_create_ggplot, "ggplot2::scale_colour_manual", m)

set.seed(123)
d <- data.frame(x = as.Date("2020-01-01") + 1:20, y = rnorm(20)) |>
d <- data.frame(x = as.Date("2020-01-01") + seq(20L), y = rnorm(20L)) |>
# introduce some special cause variation!
dplyr::mutate(
across("y", \(y) dplyr::case_when(
x > "2020-01-15" ~ y + 0.5,
TRUE ~ y
))
across("y", \(y) dplyr::if_else(.data[["x"]] > "2020-01-15", y + 0.5, y))
)

colours_neutral <- list(
Expand Down

0 comments on commit 54e7e0b

Please sign in to comment.