A test encapsulates a series of expectations about small, self-contained set of functionality. Each test is contained in a context and contains multiple expectation generated by
- test name. Names should be kept as brief as possible, as they are often used as line prefixes.
- test code containing expectations
Tests are evaluated in their own environments, and should not affect global state.
When run from the command line, tests return
NULL if all expectations are met, otherwise it raises an error.
Documentation reproduced from package testthat, version 0.11.0. License: MIT + file LICENSE