Skip to content

Commit

Permalink
Skip tests pre-native pipe support
Browse files Browse the repository at this point in the history
  • Loading branch information
bairdj committed Jul 28, 2023
1 parent 496cdd8 commit 3707d99
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/testthat/test-pipe-consistency-linter.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("pipe_consistency skips allowed usage", {
skip_if_not_r_version("4.1.0")
expect_lint("1:3 %>% mean() %>% as.character()", NULL, pipe_consistency_linter())
expect_lint("1:3 |> mean() |> as.character()", NULL, pipe_consistency_linter())
# With no pipes
Expand All @@ -12,6 +13,7 @@ test_that("pipe_consistency skips allowed usage", {
})

test_that("pipe_consistency lints inconsistent usage", {
skip_if_not_r_version("4.1.0")
expected_msg <- rex::rex("Use consistent pipe operators (either all %>% or all |>).")
expect_lint(
"1:3 |> mean() %>% as.character()",
Expand Down

0 comments on commit 3707d99

Please sign in to comment.