Skip to content

Commit 4a091c4

Browse files
committed
Add section on skipping
1 parent 76ea3da commit 4a091c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vignettes/challenging-tests.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ test_that("three dice adds values of individual calls", {
6161
})
6262
```
6363

64+
## Some tests can't be run in some circumstances
65+
66+
You can skip a test without passing or failing if it's not possible to run it in the current environment (e.g. it's OS dependent, or it only works interactively, or it shouldn't be tested on CRAN). Learn more in `vignette("skipping")`.
67+
6468
## HTTP requests
6569

6670
If you're trying to test functions that rely on HTTP requests, we recommend using {vcr} or {httptest2}. These packages provide the ability to record and then later reply HTTP requests so that you can test without an active internet connection. If your package is going to CRAN, we highly recommend either using one of these packages or using `skip_on_cran()` for your internet-facing tests. This ensures that your package won't break on CRAN just because the service you're using is temporarily down.

0 commit comments

Comments
 (0)