R: Unit Testing for R

# Unit Testing for R

## Documentation for package ‘testthat’ version 3.2.3

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A C D E F I J L M N P R S T U W

## -- A --

announce_snapshot_file | Snapshot testing for whole files
auto_test | Watches code and tests for changes, rerunning tests as appropriate.
auto_test_package | Watches a package for changes, rerunning tests as appropriate.

## -- C --

CheckReporter | Check reporter: 13 line summary of problems
CompactProgressReporter | Test reporter: interactive progress bar of errors.
compare_file_binary | Snapshot testing for whole files
compare_file_text | Snapshot testing for whole files
comparison-expectations | Does code return a number greater/less than the expected value?

## -- D --

DebugReporter | Test reporter: start recovery.
describe | describe: a BDD testing language

## -- E --

edition_get | Temporarily change the active testthat edition
equality-expectations | Does code return the expected value?
expect | The building block of all 'expect_' functions
expectation | Construct an expectation object
expect_condition | Does code throw an error, warning, message, or other condition?
expect_contains | Does code return a vector containing the expected values?
expect_equal | Does code return the expected value?
expect_error | Does code throw an error, warning, message, or other condition?
expect_failure | Tools for testing expectations
expect_false | Does code return 'TRUE' or 'FALSE'?
expect_gt | Does code return a number greater/less than the expected value?
expect_gte | Does code return a number greater/less than the expected value?
expect_identical | Does code return the expected value?
expect_in | Does code return a vector containing the expected values?
expect_invisible | Does code return a visible or invisible object?
expect_length | Does code return a vector with the specified length?
expect_lt | Does code return a number greater/less than the expected value?
expect_lte | Does code return a number greater/less than the expected value?
expect_mapequal | Does code return a vector containing the expected values?
expect_match | Does a string match a regular expression?
expect_message | Does code throw an error, warning, message, or other condition?
expect_named | Does code return a vector with (given) names?
expect_no_condition | Does code run without error, warning, message, or other condition?
expect_no_error | Does code run without error, warning, message, or other condition?
expect_no_failure | Tools for testing expectations
expect_no_match | Does a string match a regular expression?
expect_no_message | Does code run without error, warning, message, or other condition?
expect_no_success | Tools for testing expectations
expect_no_warning | Does code run without error, warning, message, or other condition?
expect_null | Does code return 'NULL'?
expect_output | Does code print output to the console?
expect_s3_class | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
expect_s4_class | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
expect_s7_class | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
expect_setequal | Does code return a vector containing the expected values?
expect_silent | Does code execute silently?
expect_snapshot | Snapshot testing
expect_snapshot_failure | Tools for testing expectations
expect_snapshot_file | Snapshot testing for whole files
expect_snapshot_value | Snapshot testing for values
expect_success | Tools for testing expectations
expect_true | Does code return 'TRUE' or 'FALSE'?
expect_type | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
expect_vector | Does code return a vector with the expected size and/or prototype?
expect_visible | Does code return a visible or invisible object?
expect_warning | Does code throw an error, warning, message, or other condition?
exp_signal | Construct an expectation object

## -- F --

fail | Default expectations that always succeed or fail.
FailReporter | Test reporter: fail at end.

## -- I --

inheritance-expectations | Does code return an object inheriting from the expected base type, S3 class, or S4 class?
is.expectation | Construct an expectation object
is_checking | Determine testing status
is_parallel | Determine testing status
is_snapshot | Determine testing status
is_testing | Determine testing status
it | describe: a BDD testing language

## -- J --

JunitReporter | Test reporter: summary of errors in jUnit XML format.

## -- L --

ListReporter | List reporter: gather all test results along with elapsed time and file information.
local_edition | Temporarily change the active testthat edition
local_mocked_bindings | Mocking tools
local_reproducible_output | Locally set options for maximal test reproducibility
local_test_context | Locally set options for maximal test reproducibility
LocationReporter | Test reporter: location
logical-expectations | Does code return 'TRUE' or 'FALSE'?

## -- M --

MinimalReporter | Test reporter: minimal.
MultiReporter | Multi reporter: combine several reporters in one.

## -- N --

new_expectation | Construct an expectation object

## -- P --

ParallelProgressReporter | Test reporter: interactive progress bar of errors.
ProgressReporter | Test reporter: interactive progress bar of errors.

## -- R --

RStudioReporter | Test reporter: RStudio

## -- S --

set_state_inspector | State inspected
show_failure | Tools for testing expectations
SilentReporter | Test reporter: gather all errors silently.
skip | Skip a test
skip_if | Skip a test
skip_if_not | Skip a test
skip_if_not_installed | Skip a test
skip_if_offline | Skip a test
skip_if_translated | Skip a test
skip_on_bioc | Skip a test
skip_on_ci | Skip a test
skip_on_covr | Skip a test
skip_on_cran | Skip a test
skip_on_os | Skip a test
snapshot_accept | Snapshot management
snapshot_review | Snapshot management
StopReporter | Test reporter: stop on error
succeed | Default expectations that always succeed or fail.
SummaryReporter | Test reporter: summary of errors.

## -- T --

TapReporter | Test reporter: TAP format.
TeamcityReporter | Test reporter: Teamcity format.
teardown_env | Run code after all test files
testing_package | Determine testing status
test_check | Run all tests in a package
test_dir | Run all tests in a directory
test_file | Run tests in a single file
test_local | Run all tests in a package
test_package | Run all tests in a package
test_path | Locate a file in the testing directory
test_that | Run a test

## -- U --

use_catch | Use Catch for C++ Unit Testing

## -- W --

with_mocked_bindings | Mocking tools