This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make test output less verbose (#497)
Make output of `devtools::test()` less verbose so we focus on key information.
- Loading branch information
1 parent
b719a75
commit 2ab82c6
Showing
2 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}) |