Skip to content

Commit

Permalink
Make skip_if_offline() more robust by checking multiple hosts (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdblischak authored Nov 29, 2023
1 parent 6cb9a69 commit b4275f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# testthat (development version)

* `skip_if_offline()` now uses `captive.apple.com` by default. This is the
host that Apple devices use to check that they're online so should be
a higher reliability host than `r-project.org` (@jdblischak, #1890).

* `test_file(desc = )` will now find `describe()` tests as well as `testthat()`
tests (#1903).

Expand Down
2 changes: 1 addition & 1 deletion R/skip.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ package_version <- function(x) {

#' @export
#' @rdname skip
skip_if_offline <- function(host = "r-project.org") {
skip_if_offline <- function(host = "captive.apple.com") {
skip_on_cran()
check_installed("curl")

Expand Down
2 changes: 1 addition & 1 deletion man/skip.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b4275f9

Please sign in to comment.