Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

use_testthat

Sets up overall testing infrastructure


Description

Creates tests/testthat/, tests/testthat.R, and adds the testthat package to the Suggests field. Learn more in https://r-pkgs.org/tests.html

Usage

use_testthat(edition = NULL, parallel = FALSE)

Arguments

edition

testthat edition to use. Defaults to the latest edition, i.e. the major version number of the currently installed testthat.

parallel

Should tests be run in parallel? This feature appeared in testthat 3.0.0; see https://testthat.r-lib.org/articles/parallel.html for details and caveats.

See Also

use_test() to create individual test files

Examples

## Not run: 
use_testthat()

use_test()

use_test("something-management")

## End(Not run)

usethis

Automate Package and Project Setup

v2.0.1
MIT + file LICENSE
Authors
Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.