This function works similarly to usethis::use_testthat. It sets up the minimal files required to make tinytest compatible with the current project.

use_tinytest()

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

Arguments

name

Either a string giving a file name (without directory) or NULL to take the name from the currently open file in RStudio.

open

Whether to open the file for interactive editing.

Value

  • use_tinytest: creates a tinytest.R file in the tests directory

  • use_tiny_test: creates a test_<name>.R file in the inst/tinytest directory where are to reside

Functions

  • use_tiny_test(): add a unit test file for testing functions in the current R file