Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Make test output less verbose (#497)
Browse files Browse the repository at this point in the history
Make output of `devtools::test()` less verbose so we focus on key information.
  • Loading branch information
maurolepore authored Oct 7, 2021
1 parent b719a75 commit 2ab82c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-unclean_column_names.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library(dplyr)
library(dplyr, warn.conflicts = FALSE)

test_that("reverses the effect of janitor::clean_names", {
data <- tibble(x.x = 1, y = 1, z.z = 1)
Expand Down
14 changes: 10 additions & 4 deletions tests/testthat/test-write_csv_file.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
test_that("with readr < 1.4.0 and named argument `file` throws no error", {
skip_if(utils::packageVersion("readr") >= "1.4.0")
# Avoid verbose message of `skip_if()`
if (!utils::packageVersion("readr") >= "1.4.0") {
x <- tibble::tibble(x = 1)
file <- tempfile()

x <- tibble::tibble(x = 1)
file <- tempfile()
expect_error(write_csv_file(x = x, file = file), NA)
none <- NA
expect_error(write_csv_file(x = x, file = file), none)
}

# Avoid message "Reason: empty test"
expect_true(TRUE)
})

0 comments on commit 2ab82c6

Please sign in to comment.