use_testthat

0th

Percentile

Create tests

use_testthat() sets up testing infrastructure, creating tests/testthat.R and tests/testthat/, and adding testthat to the suggested packages. use_test() creates tests/testthat/test-<name>.R and opens it for editing.

Usage
use_testthat()

use_test(name = NULL, open = TRUE)

Arguments
name

Test name. if NULL, and you're using RStudio, will use 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.

Aliases
  • use_testthat
  • use_test
Documentation reproduced from package usethis, version 1.2.0, License: GPL-3

Community examples

Looks like there are no examples yet.