skip

0th

Percentile

Skip a test.

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_installed(pkg)

skip_on_cran()

skip_on_travis()

Arguments
message
A message describing why the test was skipped.
pkg
Name of package to check for
Helpers

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_if_not_installed() skips a tests if a package is not installed (useful for suggested packages).

Aliases
  • skip
  • skip_if_not_installed
  • skip_on_cran
  • skip_on_travis
Examples
if (FALSE) skip("No internet connection")
Documentation reproduced from package testthat, version 0.1.1, License: GPL

Community examples

Looks like there are no examples yet.