Learn R Programming

testit (version 1.1.2)

A Simple Package for Testing R Packages

Description

A minimal, dependency-free testing framework for R packages. Write tests as simple R expressions that return TRUE, using assert() for assertions (with informative error messages on failure), has_error() / has_warning() / has_message() for testing conditions, and test_pkg() to run all tests with full access to internal (non-exported) package functions. Snapshot testing via Markdown files is also supported.

Copy Link

Version

Install

install.packages('testit')

Monthly Downloads

21,227

Version

1.1.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Yihui Xie

Last Published

September 4th, 2026

Functions in testit (1.1.2)

test_pkg

Run all tests for a package
assert

Assert that conditions are true, with an informative failure message
has_message

Test whether an expression signals a condition