use_testthat {usethis}R Documentation

Create tests

Description

There are two helper functions:

Usage

use_testthat()

use_test(name = NULL, open = interactive())

Arguments

name

Base of test file name. If NULL, and you're using RStudio, will be based on the name of the file open in the source editor.

open

Open the newly created file for editing? Happens in RStudio, if applicable, or via utils::file.edit() otherwise.

See Also

The testing chapter of R Packages.

Examples

## Not run: 
use_testthat()

use_test()

use_test("something-management")

## End(Not run)

[Package usethis version 1.5.1 Index]