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

use_testthat(edition = NULL)

Arguments

edition

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

See also

use_test() to create individual test files

Examples

if (FALSE) { use_testthat() use_test() use_test("something-management") }