R: Skip a test.

skip {testthat} | R Documentation

## Skip a test.

### Description

This function allows you to skip a test if it's not currently available. This will produce an informative message, but will not cause the test suite to fail.

### Usage

    skip(message)

    skip_if_not(condition, message = deparse(substitute(condition)))

    skip_if_not_installed(pkg)

    skip_on_cran()

    skip_on_os(os)

    skip_on_travis()

    skip_on_appveyor()

    skip_on_bioc()

### Arguments

`message` | A message describing why the test was skipped.
`condition` | Boolean condition to check. If not `TRUE`, will skip the test.
`pkg` | Name of package to check for
`os` | Character vector of system names. Supported values are `"windows"`, `"mac"`, `"linux"` and `"solaris"`.

### Helpers

`skip_if_not()` works like `stopifnot`, generating a message automatically based on the first argument.

`skip_on_cran()` skips tests on CRAN, using the `NOT_CRAN` environment variable set by devtools.

`skip_on_travis()` skips tests on travis by inspecting the `TRAVIS` environment variable.

`skip_on_appveyor()` skips tests on appveyor by inspecting the `APPVEYOR` environment variable.

`skip_on_bioc()` skips tests on Bioconductor by inspecting the `BBS_HOME` environment variable.

`skip_if_not_installed()` skips a tests if a package is not installed (useful for suggested packages).

### Examples

    if (FALSE) skip("No internet connection")

[Package testthat version 1.0.2 Index]