use_test_helper | R Documentation |
This function creates (or opens) a test helper file, typically
tests/testthat/helper.R
. Test helper files are executed at the
beginning of every automated test run and are also executed by
load_all()
. A helper file is a great place to
define test helper functions for use throughout your test suite, such as
a custom expectation.
use_test_helper(name = NULL, open = rlang::is_interactive())
name |
Can be used to specify the optional "SLUG" in
|
open |
Whether to open the file for interactive editing. |
use_test()
to create a test file.
The testthat vignette on special files
vignette("special-files", package = "testthat")
.
## Not run:
use_test_helper()
use_test_helper("mocks")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.